What I meant is that map already has its arguments in an order which is pipe-friendly (unlike some other functions I bump into every now and then).
There is no ambiguity and it seems to me that the labeled version is verbose for no obvious benefit.
# [1;2;3] |> List.map (( * ) 2);;
- : int list = [2; 4; 6]
# [1;2;3] |> ListLabels.map ~f:(( * ) 2);;
- : int list = [2; 4; 6]
Also, you couldn’t ever reverse the labeled argument of map with piping (+ it’d be such an odd use-case IMO)
# ~f:(( * ) 2) |> ListLabels.map [1;2;3];;
Error: Syntax error
# (( * ) 2) |> ListLabels.map [1;2;3];;
Warning 6 [labels-omitted]: label f was omitted in the application of this function.
- : int list = [2; 4; 6]
But it’s just something I noticed, I don’t feel too strongly about it ![]()