From 813a79a41515f4d1f6484fde3a7cdd54911b9a16 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Sun, 22 Jun 2025 14:40:27 -0400 Subject: [PATCH] add a sandbox file to replace in-code Rust string --- sandbox.ld | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sandbox.ld diff --git a/sandbox.ld b/sandbox.ld new file mode 100644 index 0000000..f30aeaa --- /dev/null +++ b/sandbox.ld @@ -0,0 +1,29 @@ +let test = 2 + +& loop ([1, 2, 3]) with { +& ([]) -> false +& ([x]) -> eq? (x, test) +& ([x, ...xs]) -> { +& let foo = :bar +& when { +& eq? (x, test) -> true +& :else -> recur (xs) +& } +& } +& } + +fn not { + (false) -> true + (nil) -> true + (_) -> false +} + +loop ([1, 2, 3]) with { + ([]) -> false + ([x]) -> eq? (x, test) + ([x, ...xs]) -> if not (eq? (x, test)) + then recur (xs) + else true + +} +