README.md in karel-interpreter-0.1.0 vs README.md in karel-interpreter-0.2.0
- old
+ new
@@ -112,22 +112,32 @@
move
end
end
```
-#### Example: nested `while`
+#### Example: a basic `while` statement
```
# This will safely remove all tokens from a square.
while token?
pick
end
```
### User-defined commands
-The Karel language supports user-defined commands, though these commands do not take
-arguments and do not return a value. Commands are defined as follows
+The Karel language supports user-defined commands. These commands do not take
+arguments and do not return a value. Commands are defined with the following syntax
+
+```
+def <command-name>
+ <statement-1>
+ <statement-2>
+ ...
+end
+```
+
+#### Example
```
def turn_around
turn_left
turn_left