Last active 1752984559

String To List Of Words

Revision 75b51ffd78e791958a4470afb41e3cb297bc33b3

toWords.hs Raw
1toWords :: String -> [String]
2toWords x
3 | length x == 0 = []
4 | otherwise = takeWhile (/= ' ') x : toWords (drop 1 (dropWhile (/= ' ') x))