Created
May 13, 2015 11:42
-
-
Save shigemk2/7fe42c23762ab36c8ee5 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 = interact shortLinesOnly | |
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