jank icon indicating copy to clipboard operation
jank copied to clipboard

Problem with lazy-cat or recursion?

Open haydenflinner opened this issue 6 months ago • 1 comments

Just built jank from master, excited to see such an expressive lang with C++ interop!

Tried out this source:

(def fibs (lazy-cat [0 1] (map + fibs (rest fibs))))
(take 4 fibs)

In Clojure in the browser, I get this: user=> (0 1 1 2)

In Jank I get this: clojure.core=> (0 1 1)

The issue gets more obvious with 10 instead of 4: user=> (0 1 1 2 3 5 8 13 21 34) vs jank (0 1 1).

The title of the bug is just a guess, I am assuming the issue is not with take, map, + or rest 😄

haydenflinner avatar Jul 13 '25 14:07 haydenflinner

Hi! Thanks for the interest in jank. We're not yet running jank against the clojure-test-suite, so it's entirely possible the issue is with any of the core functions.

Chances are that it's an issue with the lazy sequence implementation, but we'll see. I've added this ticket as a bug to be fixed for the alpha release, but we don't have anyone to look into it just yet.

Please feel free to keep exploring and report any other issues you find. There will be many.

jeaye avatar Jul 13 '25 18:07 jeaye