以下の内容はhttps://fsharp.hatenablog.com/entry/InlineFunctionsより取得しました。


インライン関数

インライン関数 Inline Functions

元ネタ http://msdn.microsoft.com/ja-jp/library/dd548047.aspx

inline 修飾子は、最上位の関数、モジュール レベルの関数、またはクラスのメソッド レベルの関数に適用できます。
最上位のインライン関数、インラインのインスタンス メソッド、およびインラインの静的メソッドを次のコード例に示します。

F#

let inline increment x = x + 1
type WrapInt32() =
    member inline this.incrementByOne(x) = x + 1
    static member inline Increment(x) = x + 1

C# にはインラインがない。JIT で最適化するからだそうだ。

Why doesn't C# have an 'inline' keyword? - Eric Gunnerson's Compendium - Site Home - MSDN Blogs http://blogs.msdn.com/b/ericgu/archive/2004/01/29/64644.aspx




以上の内容はhttps://fsharp.hatenablog.com/entry/InlineFunctionsより取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14