From ae512f0a9f72880ddbc1a05c8458c8489ac22347 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Thu, 25 Dec 2014 16:47:38 +0530 Subject: [PATCH] convert to point free style --- hw7/JoinList.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw7/JoinList.hs b/hw7/JoinList.hs index 84c3a41..58d1c9f 100644 --- a/hw7/JoinList.hs +++ b/hw7/JoinList.hs @@ -90,8 +90,7 @@ scoreLine l = let scores = map scoreString . words $ l instance Buffer (JoinList (Score, Size) String) where toString = unlines . jlToList - fromString s = let ls = lines s in - foldr (+++) Empty $ map (\x -> Single (scoreString x, Size 1) x) ls + fromString = foldr (+++) Empty . map (\x -> Single (scoreString x, Size 1) x) . lines line n b = indexJ n b replaceLine n l b = let pre = takeJ (n - 1) b post = dropJ n b -- 2.37.2