Skip to content

Instantly share code, notes, and snippets.

@teh
Created November 15, 2015 17:04
Show Gist options
  • Select an option

  • Save teh/d267ffe0c3bc767dbe09 to your computer and use it in GitHub Desktop.

Select an option

Save teh/d267ffe0c3bc767dbe09 to your computer and use it in GitHub Desktop.
-- NO !
record :: (Show a, Show label, MonadIO m) => label -> Pipe a a m ()
record label = do
x <- await
print (label, x)
yield x
-- yes:
record :: (Show a, Show label, MonadIO m) => label -> Pipe a a m ()
record label = do
x <- await
print (label, x)
yield x
record label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment