Is there a built-in Haskell equivalent for C++'s std::bind2nd? -


Whatever I am missing already has the ability to apply the second argument of partially before the function. This is particularly useful when I want to do something like map to the function, but every time without writing lambda for it.

I wrote my function for this (definition below, in fact only in fact there is no underlying work for it and someone else was curious), but I would really like to know whether this There is already a message for idiom, because I like to reuse instead of using it again.

Here are my definitions and trivial examples:

  bind2nd :: (a -> gt; b - & gt; c) - & gt; B - & gt; A - & gt; C bind2nd f b = \ a - & gt; FABFU :: IT - & gt; Boole - & gt; String foo nb. B = show n | Otherwise = "blobla" always EN :: int - & gt; String is always en = bind 2f fu true  

It is called.

Example:

  Prelude & gt; For future reference, this could be found in your question just by searching for type signature, i.e. - flip (-) 2 3 1  

: -)


Comments