Advertisement
Asdfw

Untitled

May 26th, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. words            :: String -> [String]
  2. words s          =  case dropWhile Char.isSpace s of
  3.                       "" -> []
  4.                       s' -> w : words s''
  5.                            where (w, s'') = break Char.isSpace s'
  6.  
  7.  
  8. words1            :: String -> [String]
  9. words1 s          =  case dropWhile Char.isSpace s of
  10.                       "" -> []
  11.                       s' -> w : words s''
  12.                             where s' = dropWhile Char.isSpace s
  13.                             where (w, s'') = break Char.isSpace s'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement