Created
October 4, 2011 09:19
-
-
Save halcat0x15a/1261217 to your computer and use it in GitHub Desktop.
output all element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def putStrLn[E: Show]: IterV[E, IO[Unit]] = { | |
def step(i: IO[Unit])(input: Input[E]): IterV[E, IO[Unit]] = | |
input(el = e => Cont(step(i >|> effects.putStrLn(e.shows))), | |
empty = Cont(step(i)), | |
eof = Done(i, EOF[E])) | |
Cont(step(mzero[IO[Unit]])) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment