Last active
October 26, 2017 14:34
-
-
Save deque-blog/33e713bef988eaf0cf00b41fff3e71a6 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
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