
6 May
2005
6 May
'05
5:51 p.m.
Am Freitag, 6. Mai 2005 17:32 schrieb Mark Goldman:
if I had a function f that took x y and z in that order, is there some way that I can supply y and z and get back a function that takes x? This question comes about after talking with a prof about currying and wether it buys you anything.
-mdg
Prelude> :t (flip .) . flip (flip .) . flip :: (a -> b -> c -> d) -> b -> c -> a -> d Prelude> :t (((flip .) . flip) .) . flip (((flip .) . flip) .) . flip :: (a -> b -> c -> d -> e) -> b -> c -> d ->a->e and so on. But in general you'd be better of with g z x y = f x y z, let h y z x = f x y z in and the write map (g z x) or whatever. Cheers, Daniel