Skip to content

Instantly share code, notes, and snippets.

@deque-blog

deque-blog/echo_good.idr

Last active Oct 26, 2017
Embed
What would you like to do?
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