diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-10-31 09:54:37 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-10-31 09:54:37 -0700 |
commit | 39d210899a03400aa847aec042a354b9a827b853 (patch) | |
tree | 93ff29fa8ab53e94767406fa52bbcaa9ccc23378 | |
parent | 72850faae0b2280809f5b80e103237418b6e8fd8 (diff) | |
download | mu-39d210899a03400aa847aec042a354b9a827b853.tar.gz |
tutorial: tweaks to task 14
Thanks again sejo for your comments.
-rw-r--r-- | tutorial/index.md | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tutorial/index.md b/tutorial/index.md index 463d7abd..3b9cf1d5 100644 --- a/tutorial/index.md +++ b/tutorial/index.md @@ -547,11 +547,18 @@ fn main screen: (addr screen), keyboard: (addr keyboard) { } ``` -Can you modify this program to print out the text read from keyboard a second -time? How about printing a space after every character (grapheme)? - -Now skim the section in the Mu reference on [streams](https://github.com/akkartik/mu/blob/main/mu.md#streams). -Does the above program make sense? +`read-line-from-keyboard` reads keystrokes from the keyboard until you press +the `Enter` (also called `newline`) key, and accumulates them into a _stream_. +This is a good time to skim the section in the Mu reference on +[streams](https://github.com/akkartik/mu/blob/main/mu.md#streams), just to +give yourself a sense of what you can do with them. + +Does the above program make sense now? Feel free to experiment to make sense +of it. + +Can you modify it to print out the line a second time, after you've typed it +out until the `Enter` key? Can you print a space after every character +(grapheme) when you print it out? ## Task 15: generating cool patterns |