Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- epiphany time.
- -- how to join strings with a separator using foldl1 and (++).
- join :: String -> [String] -> String
- join sep strings = foldl1 (\a b -> a ++ sep ++ b) strings
- -- ok, I'm finally beginning to think functionally.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement