4 Feb 05:36
Paramorphisms / Data.Scanable?
Jim Apple <jbapple+haskell-lib <at> gmail.com>
2007-02-04 04:36:13 GMT
2007-02-04 04:36:13 GMT
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
RSS Feed