Aria
1 program
Added 2026-02-25T00:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 2f4a052ce2 · authored 2026-02-25T11:48:23+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
99 Bottles of Beer
Provenance: commit 2f4a052ce2 · authored 2026-02-25T11:48:23+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
struct Lyrics {
type func new(n: Int) {
assert n > 0;
return alloc(This) {
.n = n,
};
}
func prettyprint() {
val suffix_n = this.n == 1 ? "" : "s";
val suffix_n_minus_1 = this.n == 2 ? "" : "s";
return "{0} bottle{2} of beer on the wall, {0} bottle{2} of beer.\nTake one down and pass it around, {1} bottle{3} of beer on the wall.\n".format(this.n, this.n-1, suffix_n, suffix_n_minus_1);
}
}
struct Song {
type func new(n: Int) {
assert n > 0;
return alloc(This) {
.n = n,
};
}
func iterator() {
return this;
}
func next() {
if this.n == 0 {
return Box(){.done = true};
}
val n = this.n;
this.n -= 1;
return Box() {
.done = false,
.value = Lyrics.new(n),
};
}
}
func main() {
val song = Song.new(99);
for verse in song {
println(verse);
}
}