From f5f1d4a440685f1443e0beec24891cd70b19c148 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Fri, 8 Dec 2023 15:04:44 -0500 Subject: [PATCH] Fix subtle parsing errors in prelude. --- src/ludus/prelude.ld | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ludus/prelude.ld b/src/ludus/prelude.ld index bfb96d1..ed40e2c 100644 --- a/src/ludus/prelude.ld +++ b/src/ludus/prelude.ld @@ -107,7 +107,7 @@ fn empty? { "Returns true if something is empty. Otherwise returns false (including for things that can't logically be empty, like numbers)." ([]) -> true (#{}) -> true - (${}) -> true + (s as :set) -> eq (s, ${}) (()) -> true ("") -> true (_) -> false @@ -169,7 +169,7 @@ fn concat { (x as :string, y as :string) -> base :str (x, y) (xs as :list, ys as :list) -> base :concat (xs, ys) (xs as :set, ys as :set) -> base :concat (xs, ys) - (xs, ys, ...zs) -> fold (concat, zs, concat(xs, ys)) + (xs, ys, ...zs) -> fold (concat, zs, concat (xs, ys)) } & the console: sending messages to the outside world @@ -188,7 +188,7 @@ fn flush! { fn add_msg! { "Adds a message to the console." - (msg as :string) -> update! (console, append, (_, msg)) + (msg as :string) -> update! (console, append (_, msg)) (msgs as :list) -> { let msg = do msgs > map (string, _) > join update! (console, append (_, msg))