projects
/
yorgey.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7dce90
)
convert to point free style
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Thu, 25 Dec 2014 11:17:38 +0000
(16:47 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Thu, 25 Dec 2014 11:17:38 +0000
(16:47 +0530)
hw7/JoinList.hs
patch
|
blob
|
history
diff --git
a/hw7/JoinList.hs
b/hw7/JoinList.hs
index 84c3a41b268295200a7e22e24c1d7d70e79b5b60..58d1c9f8efc22f51627a3b02fab0fae0a85edb01 100644
(file)
--- 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