Hello, I'm working my way through Simon Thompson's Haskell book and am having trouble with an exercise where the goal is to define "unzip" using foldr. Lambda notation and ~ , as used in the Prelude definition of unzip, have not been introduced yet. Any help on this would be appreciated. John Mann ===== "I'd rather be debugging...." - Anon __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
John Mann writes: | Hello, I'm working my way through Simon Thompson's | Haskell book and am having trouble with an exercise | where the goal is to define "unzip" using foldr. | Lambda notation and ~ , as used in the Prelude | definition of unzip, have not been introduced yet. Any | help on this would be appreciated. | John Mann Try starting with the base case of the recursion. Do you see any similarity between what unzip must do with the empty list, and what foldr does with the empty list? Regards, Tom
participants (2)
-
John Mann -
Tom Pledger