Maybe you've invented the ApoPrelude?

If I were doing it I'd probably code them in terms of an apomorphism -
unfoldr with flush. Unlike regular unfoldr which discards the final
state, an apomorphism uses the final state to produce the tail of the
output list. See Jeremy Gibbons paper "Streaming
representation-changers" section 4.4.

http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/

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

Reply via email to