|Score:||(2.95 in 163 votes)|
<A HREF=http://www.isg.sfu.ca/life/>LIFE</A> is a constraint logic programming language. %% LIFE version of 99 Bottles of beer %% by Denys Duchier email@example.com how_many(0) -> "no more". how_many(N) -> N. action(0) -> 99 | write("Go to the store and buy some more.\n"). action(N) -> N-1 | write("Take one down, pass it around.\n"). bottles(1) -> "bottle". bottles(N) -> "bottles". sing(N) :- write(H:how_many(N)," ",B:bottles(N)," of beer on the wall, ", H," ",B," of beer.\n"), write(how_many(M:action(N))," ",bottles(M), " of beer on the wall.\n\n"), sing(M).
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!