blob: 5d33e5bbaa071534aa66fe969741c41bb0df530d (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/usr/bin/env runghc
-- run <script> <space-separated strings, with no whitespace between braces>
import System.Environment (getArgs,)
import Data.List.Extra (notNull,)
import Data.List.Split (splitOneOf,)
main = do
wordchains <- getArgs >>= return.(map ((filter notNull).(splitOneOf "{,}")))
mapM_ putStrLn $ map unwords $ sequence wordchains
|