99 bottles of beer: Difference between revisions

Add Miranda
(→‎{{header|GDScript}}: Add a non-silly version)
(Add Miranda)
Line 8,046:
end
</syntaxhighlight>
 
=={{header|Miranda}}==
<syntaxhighlight lang="miranda">main :: [sys_message]
main = map (Stdout . verse) [99, 98 .. 1]
 
verse :: num->[char]
verse n = lay [bottles n ++ " of beer on the wall,",
bottles n ++ " of beer,",
"Take " ++ pronoun ++ " down and pass it around,",
bottles (n-1) ++ " of beer on the wall!",
[]]
where pronoun = "it", if n=1
= "one", otherwise
 
bottles :: num->[char]
bottles n = "No more bottles", if n=0
= "1 bottle", if n=1
= (show n) ++ " bottles", otherwise</syntaxhighlight>
 
=={{header|mIRC Scripting Language}}==
2,115

edits