why is this not being lazy? (this is for day 15, part 1)
(defn get-spoken-num [accumulator number last-val]
(lazy-seq
(let [last-seen (get accumulator last-val)
last-round-num (dec number)
seen-before? (and (some? last-seen) (< last-seen last-round-num))
this-round (if seen-before? (- last-round-num last-seen) 0)]
(cons
this-round
(get-spoken-num
(assoc accumulator this-round number)
(inc number)
this-round)))))
hmm, actually maybe it is ( take 10 (…)
works fine). I guess evaluating the full lazy sequence in the REPL actually traverses it