From 8eaeb992d6b36485dc7a4ee92184e9b611bec996 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Mon, 21 Sep 2026 12:01:34 +0700 Subject: [PATCH] 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. --- sand.flan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sand.flan b/sand.flan index f683bac..f5f48b6 100644 --- a/sand.flan +++ b/sand.flan @@ -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)]