Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
99 bottles of beer (in Dyon)
fn main() {
n := 99
println(link {
link i n {
b := n-i
bottles(b)" of beer on the wall, "bottles(b)" of beer.\n"
"Take one down, pass it around, "bottles(b-1)" of beer on the wall.\n\n"
}
"No more bottles of beer on the wall, no more bottles of beer.\n"
"Go to the store and buy some more, "n" bottles of beer on the wall.\n"
})
}
bottles(n: f64) =
if n == 0 {"no more bottles"}
else if n == 1 {"1 bottle"}
else {str(n) + " bottles"}
@bvssvni

This comment has been minimized.

Copy link
Owner Author

bvssvni commented Dec 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.