0
0

More than 5 years have passed since last update.

[Kotlin]インライン関数について

Last updated at Posted at 2018-06-13
  • インライン関数の正体

 Kotlinのラムダ式は無名クラスを生成します。つまりラムダ式を使えば使うほど無名クラスが増えていくということになります。簡単な処理のためだけにどんどん無名クラスを増やしてしまうのは避けたいところです。そこでインライン関数を使います。
 
 
* inline修飾子とは

inline修飾子は主に関数を引数に持つ関数に使われる修飾子です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0