Jim Apple | 4 Feb 05:36
Picon

Paramorphisms / Data.Scanable?

I understand that it may not be possible to give simple types to
anamorphisms or hylomorphisms, but I don't see there can't be a
Data.Scannable with paramorphisms.

class Scannable t where
    scanr :: (a -> b -> b) -> b -> t a -> t b
    scanl :: (a -> b -> a) -> a -> t b -> t a
    scanr1 :: (a -> a -> a) -> t a -> t a
    scanl1 :: (a -> a -> a) -> t a -> t a

Jim

Gmane