User loginNavigation 
using foldr to do mapI am reading Hutton's book, programming in Haskell, and got stumped by a question. redefine map f using foldr. Since foldr is described as replacing (:) in a list with some provided operator it seemed it shouldn't be too hard. So I tried this: > folmap :: (a > b) > [a] > [b] My reasoning is that you apply the : operator after f on every value in the list. (Though I may not understand the (.) I was thinking that if f = (a >b) and g = (b > c) then g.f would be g performed after f (or g.f is f followed by g). Any advice?? By jdgallag at 20080610 16:57  LtU Forum  previous forum topic  next forum topic  other blogs  6290 reads

Browse archivesActive forum topics 
Recent comments
14 hours 17 min ago
17 hours 36 min ago
17 hours 53 min ago
22 hours 23 min ago
1 day 5 hours ago
1 day 11 hours ago
1 day 11 hours ago
1 day 15 hours ago
2 days 9 hours ago
2 days 11 hours ago