From: Ramakrishnan Muthukrishnan Date: Thu, 25 Dec 2014 11:17:38 +0000 (+0530) Subject: convert to point free style X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/URI:LIT:krugkidfnzsc4/frontends/-?a=commitdiff_plain;h=ae512f0a9f72880ddbc1a05c8458c8489ac22347;p=yorgey.git convert to point free style --- 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