-- BROKEN

> module Listcont
>        (listcont)
>        where
> import Data.List
> import Data.List.Split
> import List

> modlist p q l = map ((split . keepDelimsL) (whenElt (q))) ((split . keepDelimsL) (whenElt (p)) l)

- > itemstart x = length x >= 2 && head x == '-'

> emptyline x = nub x == [' ']

> listcont s = unlines $ map concat (concat (modlist isli emptyline (lines s)))

> isli :: [Char] -> Bool
> isli l = (length l >=2)                      &&
>          (head (dropWhile (== ' ') l) == '-') &&
>          ((dropWhile (== ' ') l)!!1 == ' ')


-- we need to add something after the group

$ pointfree "f s = unlines $ map concat (concat (modlist li empty (lines s)))"
f = unlines . map join . join . modlist li empty . lines

> x = "this\n- list item starts here\n and goes to next line\n-another item \n \nHello World"

> f s = (modlist emptyline isli (lines s))

> m = (split . keepDelimsL) (whenElt (isli)) 


-> y = lines x
-> z = modlist li empty y

*Main> unlines $ map concat (concat z)
"this\n- list item starts here and goes to next line\n \n Hello World\n"
