Rename the := special form to set so it does not look like a keyword.

This commit is contained in:
Calvin Rose
2018-12-16 21:57:32 -05:00
parent f7a25ecae3
commit 03dbd79165
11 changed files with 106 additions and 107 deletions
+2 -2
View File
@@ -18,8 +18,8 @@
(if ,loaded
,state
(do
(:= ,loaded true)
(:= ,state (do ;forms)))))))
(set ,loaded true)
(set ,state (do ;forms)))))))
# Use tuples instead of structs to save memory
(def- HEAD 0)
+2 -2
View File
@@ -24,7 +24,7 @@
"Draw cells in the game of life from (x1, y1) to (x2, y2)"
[state x1 y1 x2 y2]
(def cellset @{})
(each cell state (:= cellset@cell true))
(each cell state (set cellset@cell true))
(loop [x :range [x1 (+ 1 x2)]
:after (print)
y :range [y1 (+ 1 y2)]]
@@ -40,4 +40,4 @@
(for i 0 20
(print "generation " i)
(draw *state* -7 -7 7 7)
(:= *state* (tick *state*)))
(set *state* (tick *state*)))
+1 -1
View File
@@ -9,6 +9,6 @@
(def len (length list))
(for j 0 len
(def trial (get list j))
(if (zero? (% i trial)) (:= isprime? false)))
(if (zero? (% i trial)) (set isprime? false)))
(if isprime? (array/push list i)))
list)