From 5bdaa1e4ffe40add10f000ee993e6b500c419a37 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sat, 9 Aug 2014 10:58:03 +0800 Subject: add files from home for previous chapters and sandboxes --- shortlines.hs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 shortlines.hs (limited to 'shortlines.hs') 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 + -- cgit v1.2.3-70-g09d2