From ee4438bf1ea5b552f00937dff507a8cd0f73da34 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Thu, 19 May 2022 16:58:13 -0400 Subject: [PATCH] Testing, small typo fix --- src/ludus/interpreter.clj | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/ludus/interpreter.clj b/src/ludus/interpreter.clj index 6383566..f21b0f2 100644 --- a/src/ludus/interpreter.clj +++ b/src/ludus/interpreter.clj @@ -12,7 +12,7 @@ ;; it's got runtime checking ;; we should be able to do these checks statically ;; that's for later, tho -(defn- resolve-word[word ctx-vol] +(defn- resolve-word [word ctx-vol] (let [ctx @ctx-vol] (if (contains? ctx word) (get ctx word) @@ -405,9 +405,22 @@ (def source " - let foo = :bar + let mytest = { + fn even { + (0) -> true + (n) -> odd (dec (n)) + } - fn foof () -> panic! (:oops) + fn odd { + (0) -> false + (n) -> even (dec (n)) + } + + @{odd, even} + } + + mytest :odd (1) + mytest :even (955) ")