Is there a `flip` function in the OCaml standard library? -


in haskell, have flip function: flip f x y = f y x, takes function , returns same function except 2 arguments swapped. wonder if there counterpart in ocaml, since not find 1 , don't want rewrite every time.

cheers,

many functions generalized fp plumbing aren't defined in standard ocaml library. have missed them.

however, nowadays there ocaml libraries supply or of these missing functions. ocaml batteries included project defines flip in batstd module. jane street core project defines flip in fn module.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -