On 11/09/2010 09:19 PM, Arlen Christian Mart Cuss wrote: > Hi all, > > I know this was asked at least 12 years ago[1], but is there any > consensus or reason for there not being a "compose" function in standard > OCaml, nor an infix operator? > > At the moment I tend to "let compose" or "let (<<-) f g x = f (g x)", > but I wish I didn't have to!
Batteries[1] includes such an operator in its Std module and its extension of Pervasives. The compose operator is is '-|', and the reverse compose operator is '|-' ((f |- g) x = g (f x)). It also provides the pipeline operator '|>' and its converse application operator '**>'. - Michael 1. http://batteries.forge.ocamlcore.org _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs