In my practice of programming in OCaml, I have recently discovered that the following pipeline operator is very useful to create functions.
let (>|) f g x = g (f x)val ( >| ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c = <fun>
I use it to replace codes like:
fun s -> int_of_string s |> Int.hash - : string -> int = <fun>
By the simpler:
int_of_string >| Int.hash- : string -> int = <fun>
The associativity works fine:
int_of_string >| float_of_int >| string_of_float- : string -> string = <fun>
Would that be a valuable improvement of the core language, and if so, how to submit this contribution?