Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- words :: String -> [String]
- words s = case dropWhile Char.isSpace s of
- "" -> []
- s' -> w : words s''
- where (w, s'') = break Char.isSpace s'
- words1 :: String -> [String]
- words1 s = case dropWhile Char.isSpace s of
- "" -> []
- s' -> w : words s''
- where s' = dropWhile Char.isSpace s
- where (w, s'') = break Char.isSpace s'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement