Skip to content

feature: * repeats a list or a text - #30

Merged
FadiShawki merged 1 commit into
mainfrom
core/repeat
Oct 16, 2026
Merged

FadiShawki merged 1 commit into
mainfrom
core/repeat

Conversation

@benjaminshawki

Copy link
Copy Markdown
Contributor

[0] * 3 == [0, 0, 0] and `ab` * 2 == `abab`, as Design.md §11 has it ("* n repeats a structure"). A Ray &+= block at the end of Ray.ray and a String &+= block at the end of String.ray, with six asserts (RP2 to RP7). The bootstrap's tests: the same 101 errors as main, and the six new asserts pass. With it, poc/needs/deflate.ray (#29) goes from 13 to 14 of 17.

Written as a loop: the recursive form this.joined(this * times.pred) gives a wrong answer three levels down, though each step is right alone ([5] * 2 passes, [5] * 3 does not). That looks like a kernel issue worth a look.

@FadiShawki
FadiShawki merged commit 595382d into main Oct 16, 2026
11 of 12 checks passed
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.

2 participants