Skip to content

Instantly share code, notes, and snippets.

@snoyberg
Created December 15, 2010 19:24
Show Gist options
  • Save snoyberg/742455 to your computer and use it in GitHub Desktop.
Save snoyberg/742455 to your computer and use it in GitHub Desktop.
enumeratee that appends to a stream
after :: Enumerator a IO b -> Enumeratee a a IO b
after enum =
loop
where
loop = checkDone $ continue . step
step k EOF = enum (Continue k) >>== return
step k s = k s >>== loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment