summaryrefslogtreecommitdiff
path: root/shortlines.hs
diff options
context:
space:
mode:
Diffstat (limited to 'shortlines.hs')
-rw-r--r--shortlines.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/shortlines.hs b/shortlines.hs
new file mode 100644
index 0000000..267e595
--- /dev/null
+++ b/shortlines.hs
@@ -0,0 +1,7 @@
+import Data.Char
+
+main = do
+ contents <- getContents
+ let shortLines = unlines . filter ((<10).length) . lines in
+ putStr $ shortLines contents
+