Replies: 2 comments
-
AFAICT, it works in this commit, but not in the one after. FWIW, on a related note, there is some prime-number-related functionality in spork now: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Quick fix: repl:1:> (def g (generate [x :range [1 () 2]] x))
<fiber 0x5620123A2760>
repl:2:> (take 10 g)
@[1 3 5 7 9 11 13 15 17 19] Works because: repl:3:> (< 1 nil)
true
repl:4:> (< 1 ())
true I don't know that I'd recommend doing this, though. Using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As the title, I have a prime-number generator using a fiber/generator/coroutine and this was a useful trick to not have to specify an upper limit on the main loop.
Now it runs the loop once with a value of 0 and then quits? Not sure, but it doesn't do what it used to.
Beta Was this translation helpful? Give feedback.
All reactions