From 5a27d345eb7331398ab94bbcc9036b102bcee64b Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Fri, 14 Jun 2024 15:43:52 -0400 Subject: [PATCH] fix goto! error --- prelude.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prelude.ld b/prelude.ld index c70f607..b6b0c3d 100644 --- a/prelude.ld +++ b/prelude.ld @@ -1271,7 +1271,7 @@ fn heading/vector { fn apply_command { "Takes a turtle state and a command and calculates a new state." (state, command) -> match command with { - (:goto, (x, y)) -> assoc (state, :position, (x, y)) + (:goto, (x, y)) -> assoc (state, :position, (neg (x), y)) (:home) -> assoc (state, :position, (0, 0)) (:clear) -> assoc (state, :position, (0, 0)) (:right, turns) -> update (state, :heading, add (_, turns))