Hi Jonas

Thanks - I was meaning an equivalent to viewl on Data.Sequence, on plain lists:

viewl :: [a] -> Either () (a,[a])
viewl []     = Left ()
viewl (x:xs) = Right (x,xs)


It was a trick question because I can't see how you can do it without
decrement on the Peano numbers.

Best wishes

Stephen
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to