Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Apply a function to two values, the values being a pair on the left, the function on the right.
Namespace/Module Path: Microsoft.FSharp.Core.Operators
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature:
( ||> ) : 'T1 * 'T2 -> ('T1 -> 'T2 -> 'U) -> 'U
// Usage:
(arg1, arg2) ||> func
Parameters
arg1
Type: 'T1The first argument.
arg2
Type: 'T2The second argument.
func
Type: 'T1 -> 'T2 -> 'UThe function.
Return Value
The function result.
Example
The following example demonstrates the use of the ||> operator.
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
("abc", "def") ||> append gives "abc.def"
result2: "ABC.DEF"
Platforms
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
Version Information
F# Core Library Versions
Supported in: 2.0, 4.0, Portable