Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active October 26, 2017 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/33e713bef988eaf0cf00b41fff3e71a6 to your computer and use it in GitHub Desktop.
Save deque-blog/33e713bef988eaf0cf00b41fff3e71a6 to your computer and use it in GitHub Desktop.
echo : IO ()
echo = runEffect $ -- Run the pipeline which
stdinLn "in> " -- * read the standard input
.| takingWhile (/= "quit") -- * as long as the user does not write "quit"
.| mapping ("out> " ++) -- * preprend "out>" to the string read
.| stdoutLn -- * then write the string in standard output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment