Your first run
Start with something you can see immediately. This program returns a number. It does not print to a terminal or contact a service; its result is the value the caller receives.
pub flow main() -> Int = 21 * 2
42Read the line from the outside in
The name main identifies a function. flow declares it, and pub makes it public so it can be chosen as the run's entry. The empty parentheses mean it takes no input. -> Int says its result is an integer. After = comes the expression that computes the result.
There is no separate return statement here. The expression 21 * 2 is the body, so its value is the function's value.
Choose Edit this example, then Run. You should see 42. Change a number and run again. That second result comes from your edited source, not from the example printed above it.
Make a useful mistake
Replace 21 with the text "twenty-one". Run the program. The compiler tells you that the multiplication does not accept those values. Restore the number and run again.
An error is information about this source. You can experiment without losing the original: Reset restores the lesson's files and input.
Before you move on
Try the exercise beneath the editor: make the program return 84. The exercise checks the result, so you can choose your own expression. The next chapter replaces a value you can compute with one that comes from outside the program.
Exact rules: functions and evaluation, data types.