Created
May 13, 2015 11:38
-
-
Save shigemk2/594a963c3706fbf8f02e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i’m short | |
so am i | |
i am a loooooooooong line!!! | |
yeah i’m long so what hahahaha!!!!!! | |
short line | |
loooooooooooooooooooooooooooong | |
short |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main = do | |
contents <- getContents | |
putStr (shortLinesOnly contents) | |
shortLinesOnly :: String -> String | |
shortLinesOnly = unlines . filter (\line -> length line < 10) . lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment