1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-02 08:33:04 +00:00

Replace varset! with algol style :=

This commit is contained in:
Calvin Rose
2018-03-16 18:15:34 -04:00
parent f5213e4064
commit 4a76f2ae32
6 changed files with 27 additions and 22 deletions

View File

@@ -11,10 +11,11 @@
state
(do
(def n (f))
(varset! state n)
(varset! loaded true)
(:= state n)
(:= loaded true)
n))))
# This creates one more closure than necessary but oh well
(defmacro delay
"Macro for lazy evaluation"
[& forms] (tuple mem0 (apply1 tuple (array-concat ['fn []] forms))))