Is there an infix function composition operator in OCaml? -
just quick question. i'm wondering if there infix function composition operator in ocaml defined in standard library (or in jane street's core or in batteries) (.) function in haskell saves lot parentheses since can write (f . g . h) x
instead of less appealing f (g (h x)))
.
thanks folks.
the answer here same flip
:-). function composition isn't defined in ocaml standard library. in case, isn't miss once in while, miss time.
the ocaml batteries included project defines function composition (in order give) using operator -|
in batstd
module. lukstafi points out (see below), operator apparently change %
in future release of batteries. (i've verified in source tree.)
as far can see, jane street core project doesn't define function composition operator. defines function compose
in fn
module.
Comments
Post a Comment