Paramorphisms / Data.Scanable?
jbapple+haskell-lib at gmail.com
Sat Feb 3 23:36:13 EST 2007
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
More information about the Libraries