On Wed, Mar 2, 2011 at 12:00 AM, Stephen Tetley
wrote:
> 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 th
On Thu, Mar 3, 2011 at 12:33 AM, Mark Lentczner
wrote:
> To make up for my total misunderstanding of what you were asking
> before, I hereby offer you the Plumbing module, available here:
> https://bitbucket.org/mtnviewmark/haskell-playground/src/2d022b576c4e/Plumbing.hs
>
> With it, I think you
To make up for my total misunderstanding of what you were asking
before, I hereby offer you the Plumbing module, available here:
https://bitbucket.org/mtnviewmark/haskell-playground/src/2d022b576c4e/Plumbing.hs
With it, I think you can construct the kinds of pipelines you describe
with the compo
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
re
I have a few functions for operating on lists that take continuations:
-- | Like takeWhile but with a continuation, so you can chain takes without
-- copying.
takeWhileThen :: (a -> Bool) -> ([a] -> [a]) -> [a] -> [a]
takeWhileThen _ _ [] = []
takeWhileThen f cont (x:xs)
| f x = x : takeWhileT