Last active 1752984559

String To List Of Words

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