Sometimes I have to write:
myList |> List.iter (fun x -> x)
I would really like to avoid parentheses. Haskell has an operator for this ($)
It will look like
myList |> List.iter $ fun x -> x
I created a custom statement
let inline (^!) f a = f a
and now I can write it like this:
myList |> List.iter ^! fun x -> x
Is there something similar in F #?
source
share