Uwaga
Dostęp do tej strony wymaga autoryzacji. Może spróbować zalogować się lub zmienić katalogi.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Redaguje dwóch funkcji, funkcja po prawej stronie, najpierw stosowany.
Ścieżka obszaru nazw/modułu: Microsoft.FSharp.Core.Operators
Zestaw: FSharp.Core (w FSharp.Core.dll)
// Signature:
( << ) : ('T2 -> 'T3) -> ('T1 -> 'T2) -> 'T1 -> 'T3
// Usage:
func2 << func1
Parametry
func2
Typ:'T2 -> 'T3Druga funkcja zastosować.
func1
Typ:'T1 -> 'T2Pierwsza funkcja zastosować.
Wartość zwracana
Skład funkcji wejściowych.
Uwagi
Ten operator jest określone jako do tyłu lub skład wstecznego operator.
Przykład
Poniższy przykład ilustruje użycie operatora skład wstecznego (<<).
let append1 string1 = string1 + ".append1"
let append2 string1 = string1 + ".append2"
// Reverse composition of two functions.
let appendBothReverse = append1 << append2
printfn "%s" (appendBothReverse "abc")
// Reverse composition of three functions.
let append3 string1 = string1 + ".append3"
printfn "%s" ((append1 << append2 << append3) "abc")
// Reverse composition of functions with more than one parameter.
let appendString (string1:string) (string2:string) = string1 + string2
let appendFileExtension extension =
appendString extension << appendString "."
printfn "%s" (appendFileExtension "myfile" "txt")
Platformy
Windows 8, Windows 7, Windows Server 2012 Windows Server 2008 R2
Informacje o wersji
F# Core wersji biblioteki
Obsługiwane: 2.0, 4.0, przenośne