Closed primo-ppcg closed 1 year ago
I tried out the changes a bit.
The spork test bit mentioned here seems to be resolved. Ran the spork test suite and that was fine too.
Also ran the tests I've been running across some other repositories with no issues :+1:
Actually, these functions don't make much sense on a fiber.
For example:
(defn gen []
(coro
(for i 0 10 (yield i))))
(keys (gen))
# ->
@[0 0 0 0 0 0 0 0 0 0]
This is true of every major Janet release; the next key of an active fiber is always 0. I believe it is more correct for keys
to produce an error, than to return an array of zeros.
Instead, I think generators/to-array
should be rewritten to do as it says: consume the values into an array.
https://github.com/janet-lang/spork/pull/148
lengthable?
to corelib, as mentioned here.Check if x is a bytes, indexed, or dictionary.