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