From a51d50aa303b253e582e5e39d96f89b9df076ff6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 27 Nov 2021 10:00:51 -0800 Subject: [PATCH] . --- tour.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tour.md b/tour.md index 5557042..4979e68 100644 --- a/tour.md +++ b/tour.md @@ -38,10 +38,13 @@ Can you figure out what this app does, what you can do with it? There's a number on screen. Hit `enter`. The number increments by 1. Hit `ctrl-x` to exit (press `ctrl` and `x` on your keyboard at the same time). -Try editing the app by hitting `ctrl-e`. You see a "big picture" view of the -app. Spend a few moments scanning this page. All programs consist of data and -_functions_: code that operates on data in some way. Teliva apps always start -by running the special function `main`. +Run the app again. Try editing the app by hitting `ctrl-e`. You see a "big +picture" view of the app. Spend a few moments scanning this page. All programs +consist of data and _functions_: code that operates on data in some way. +Teliva apps always start by running the special function `main`. The big +picture orders functions from the _top down_. It shows `main` up top, +functions that `main` calls below, functions called by _those_ functions next, +and so on. Try browsing to some of the names visible on screen. Don't be afraid to experiment. The menu at the bottom always shows the hotkeys available to you @@ -62,8 +65,9 @@ when the app runs? Start by looking inside `main`. Most Teliva apps tend to share a basic structure in `main`: - some initialization, followed by -- a loop that repeatedly updates the screen and then waits for the user to - press a key +- a loop that repeatedly: + * updates the screen, and then + * waits for the user to press a key Can you map the lines of `main` to this structure? Which function describes how the app updates the screen?