A tuple is piped by:
let a = (1,2)
let f a b = ()
a ||> f
A triple is piped by:
let a = (1,2,3)
let f a b c = ()
a |||> f
But this doesn't work for a quadruple:
let a = (1,2,3,4)
let f a b c d= ()
a ||||> f
How do you pipe a quadruple to a function?
The others are defined by F#, for a 4-tuple you need to define it yourself:
let a = (1,2,3,4)
let f a b c d = printfn "got %A %A %A %A" a b c d
let inline (||||>) (a,b,c,d) f = f a b c d
a ||||> f
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With