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