sand.flan asks for length
Two sites, and the second is the subtle one: the let binds a local named length from (length coll), which reads because a sequential let checks an initialiser before the name it binds exists. That was the reason for the rename -- len is a variable now.
This commit is contained in:
parent
970d5ac38f
commit
8eaeb992d6
@ -28,7 +28,7 @@
|
||||
(defn insertion-sort [coll [$t]] ()
|
||||
{:where (ordered? $t)}
|
||||
(let [i 1
|
||||
length (len coll)]
|
||||
length (length coll)]
|
||||
(while (and (< i length))
|
||||
(let [j i]
|
||||
(while (and (> j 0)
|
||||
@ -52,7 +52,7 @@
|
||||
(set velocity (zeroed)))
|
||||
|
||||
(defn next-color [] ()
|
||||
(set current-color (% (+ current-color 1) (len colors))))
|
||||
(set current-color (% (+ current-color 1) (length colors))))
|
||||
|
||||
(defn paint-at [row i32 col i32] ()
|
||||
(let [half (/ brush-size 2)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user