(no subject)

Mar 13, 2004 23:31

You are... Haskell!

module Main where

main = song 99

song n =
bob n ++ " on the wall,\n" ++
bob n ++ ".\n" ++
"Take one down, pass it around.\n" ++
if n == 1
then
"No more bottles of beer on the wall.\n"
else
bob (n-1) ++ " on the wall.\n"
++ song (n-1)

bob n =
show n ++ bottle ++ " of beer"
where
bottle = " bottle" ++ if n == 1 then "" else "s"

What programming language are you?

Hmm, I was really avoiding finding out about Haskell. Maybe this is a sign...
Previous post Next post
Up