bobbicodes / bobbi-lisp

Interactive Lisp environment for learning Clojure
https://bobbicodes.github.io/bobbi-lisp/
0 stars 0 forks source link

Lazy sequences not working, but at least nothing else broke #18

Closed bobbicodes closed 11 months ago

bobbicodes commented 11 months ago
(defn fib
  ([]
   (fib 1 1))
  ([a b]
   (lazy-seq (cons a (fib b (+ a b))))))

(take 5 (fib))
=> (1 [object Object])

sad_trombone.mp3

At least I somehow got the first element out of it...

As much as I'm disappointed that it's not working, I see no reason not to merge this because there are still around 140 tests passing, same as before.

Also adds the new special form, which is useful in itself. Assuming it works, because I haven't tried it with anything else. But for all I know, that could be the problem, or part of it.