[Haskell-cafe] Re: currying combinators

Yitzchak Gale gale at sefer.org
Wed May 26 07:07:19 EDT 2010


I wrote:
>> keep :: ((t ->  b) ->  u ->  b) ->  ((t1 ->  t) ->  b) ->  (t1 ->  u) -> b
>> so then
>> nameZip = keep (drop' . drop') names

Günther Schmidt wrote:
> don't be tease man, show me what you got :)

Ivan Miljenovic wrote:
>> Methinks Yitzchak made a typo

Yes, sorry about that. Tested in ghci this time :).

keep :: (forall c . (t ->  c) ->  u ->  c) ->  ((t1 ->  t) ->  b) ->
(t1 ->  u) -> b
keep transform rec = \fn -> rec $ transform id . fn

Regards,
Yitz


More information about the Haskell-Cafe mailing list