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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -