
21 Sep
2007
21 Sep
'07
1:55 a.m.
Hi reverse = foldl (xs x . x:xs) [] (xs ++ ) = foldl (\ys y -> ys ++ [y]) xs If I were to define reverse with foldl I would do it this way: reverse = foldl (\x -> \xs -> xs:x) [] Any idea what the first code frag is suposed to achieve? Thanks, Paul