F# piping a quadruple to a function

f#

Solution

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

Problem

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?

Original source