@@ -74,6 +74,15 @@ words' s = case dropWhile isSpace s of
7474words : String -> List String
7575words s = map pack $ words' $ unpack s
7676
77+lines' : List Char -> List (List Char)
78+lines' s = case dropWhile isNL s of
79+ [] => []
80+ s' => let (w, s'') = break isSpace s'
81+ in w :: words' s''
82+
83+lines : String -> List String
84+lines s = map pack $ words' $ unpack s
85+
7786partial
7887foldr1 : (a -> a -> a) -> List a -> a
7988foldr1 f [x] = x