2025-06-23 03:58:55 +00:00
|
|
|
let command = [:forward, 100]
|
2025-06-22 23:42:25 +00:00
|
|
|
|
2025-06-23 03:57:11 +00:00
|
|
|
match command with {
|
|
|
|
(:goto, (x, y)) -> "goto: {x} and {y}"
|
2025-06-23 03:58:55 +00:00
|
|
|
[:one, :two] -> :no
|
2025-06-23 03:57:11 +00:00
|
|
|
(:home) -> "go home!"
|
|
|
|
& (:clear) -> "clear the screen"
|
|
|
|
& (:right, turns) -> "make {turns} to the right"
|
|
|
|
& (:left, turns) -> "turn left! by {turns}"
|
|
|
|
(:forward, steps) -> "forward {steps} turtle paces"
|
|
|
|
(:back, steps) -> "flip it and reverse it {steps}"
|
2025-06-23 03:58:55 +00:00
|
|
|
[...xs] -> :splatted
|
2025-06-23 03:57:11 +00:00
|
|
|
}
|
2025-06-22 18:40:27 +00:00
|
|
|
|