Created
May 28, 2014 02:41
-
-
Save mwotton/e443020996ce38c51ec9 to your computer and use it in GitHub Desktop.
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
until' prod consumer = do | |
r <- prod | |
case r of | |
Nothing -> return () | |
Just x -> consumer x >> until' prod consumer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment