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

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to