套用到兩個值,正在左邊 [右邊的函式上的一組值的函式。
命名空間/模組路徑: Microsoft.FSharp.Core.Operators
組件:FSharp.Core (在 FSharp.Core.dll 中)
// Signature:
( ||> ) : 'T1 * 'T2 -> ('T1 -> 'T2 -> 'U) -> 'U
// Usage:
(arg1, arg2) ||> func
參數
arg1
型別:'T1第一個引數。
arg2
型別:'T2第二個引數。
func
型別:'T1 -> 'T2 -> 'U函式。
傳回值
函式結果。
範例
下列範例示範如何使用 ||>運算子。
let append string1 string2 = string1 + "." + string2
let result1 = ("abc", "def") ||> append
printfn "(\"abc\", \"def\") ||> append gives %A" result1
let toUpper (string1:string) (string2:string) = string1.ToUpper(), string2.ToUpper()
let result2 = ("abc", "def")
||> toUpper
||> append
printfn "result2: %A" result2
平台
Windows 7、Windows Vista SP2、Windows XP SP3、Windows XP x64 SP2、Windows Server 2008 R2、Windows Server 2008 SP2、Windows Server 2003 SP2
版本資訊
F# 執行階段
支援版本:2.0、4.0
Silverlight
支援版本:3