99 bottles of beer: Difference between revisions
Content added Content deleted
(→{{header|GDScript}}: Add a non-silly version) |
Not a robot (talk | contribs) (Add Miranda) |
||
Line 8,046: | Line 8,046: | ||
end |
end |
||
</syntaxhighlight> |
</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}}== |
=={{header|mIRC Scripting Language}}== |