Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add native repeat object #128

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Add native repeat object #128

merged 1 commit into from
Nov 11, 2024

Conversation

jianlingzhong
Copy link
Contributor

@jianlingzhong jianlingzhong commented Nov 11, 2024

Works as expected:

❯ build/jank repl
Bottom of clojure.core
> (take 3 (repeat 0))
(0 0 0)
> (take 3 (repeat -1))
(-1 -1 -1)
> (def a (repeat 3 4))
#'clojure.core/a
> a
(4 4 4)
> (first a)
4
> (next a)
(4 4)
> (next (next a))
(4)
> (repeat 0 1)
()
> (repeat -1 1)
()
> (repeat 0)  ; ==> repl hangs here
^C

This closes #52 .

@jianlingzhong jianlingzhong force-pushed the repeat branch 8 times, most recently from 864dc5a to 31a10c5 Compare November 11, 2024 04:41
@jianlingzhong jianlingzhong force-pushed the repeat branch 3 times, most recently from ce5f8db to 8806c20 Compare November 11, 2024 20:46
@jeaye jeaye merged commit f02b9b8 into jank-lang:main Nov 11, 2024
2 of 4 checks passed
@jeaye
Copy link
Member

jeaye commented Nov 11, 2024

Nice work, @jianlingzhong!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add repeat sequence object
2 participants