Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/runhaskell
- scode = [ "#!/usr/bin/runhaskell"
- , ""
- , ""
- , "scode = [ "
- , ""
- , ""
- , "backslash = "
- , "quote = "
- , "indent = "
- , "commasp = "
- , "spbracket = "
- , ""
- , ""
- , "main = do"
- , " foldl1 (>>) (map putStrLn (take 3 scode))"
- , " putStrLn ((scode !! 3) ++ quote ++ (scode !! 0) ++ quote)"
- , " foldl1 (>>) (map (putStrLn . ((indent ++ commasp ++ quote) ++) . (++ quote)) (init . tail $ scode))"
- , " putStrLn (indent ++ commasp ++ quote ++ (last scode) ++ quote ++ spbracket)"
- , " foldl1 (>>) (map putStrLn ((drop 4) . (take 6) $ scode))"
- , " putStrLn ((scode !! 6) ++ quote ++ backslash ++ backslash ++ quote)"
- , " putStrLn ((scode !! 7) ++ quote ++ backslash ++ quote ++ quote)"
- , " putStrLn ((scode !! 8) ++ quote ++ indent ++ quote)"
- , " putStrLn ((scode !! 9) ++ quote ++ commasp ++ quote)"
- , " putStrLn ((scode !! 10) ++ quote ++ spbracket ++ quote)"
- , " foldl1 (>>) (map putStrLn (drop 11 scode))" ]
- backslash = "\\"
- quote = "\""
- indent = " "
- commasp = ", "
- spbracket = " ]"
- main = do
- foldl1 (>>) (map putStrLn (take 3 scode))
- putStrLn ((scode !! 3) ++ quote ++ (scode !! 0) ++ quote)
- foldl1 (>>) (map (putStrLn . ((indent ++ commasp ++ quote) ++) . (++ quote)) (init . tail $ scode))
- putStrLn (indent ++ commasp ++ quote ++ (last scode) ++ quote ++ spbracket)
- foldl1 (>>) (map putStrLn ((drop 4) . (take 6) $ scode))
- putStrLn ((scode !! 6) ++ quote ++ backslash ++ backslash ++ quote)
- putStrLn ((scode !! 7) ++ quote ++ backslash ++ quote ++ quote)
- putStrLn ((scode !! 8) ++ quote ++ indent ++ quote)
- putStrLn ((scode !! 9) ++ quote ++ commasp ++ quote)
- putStrLn ((scode !! 10) ++ quote ++ spbracket ++ quote)
- foldl1 (>>) (map putStrLn (drop 11 scode))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement