summaryrefslogtreecommitdiff
path: root/week1/camil/2.11/BottlesOfBeer.icl
diff options
context:
space:
mode:
authorMart Lubbers2015-04-16 21:22:20 +0200
committerMart Lubbers2015-04-16 21:22:20 +0200
commit6f604b19d3f5966e5c1d7c4fdf3703bd6ff0861c (patch)
tree96d580507249f7f58368476d9113007d4afcd748 /week1/camil/2.11/BottlesOfBeer.icl
parentAdded student numbers (diff)
update to fp2 yay, public and licence
Diffstat (limited to 'week1/camil/2.11/BottlesOfBeer.icl')
-rw-r--r--week1/camil/2.11/BottlesOfBeer.icl21
1 files changed, 0 insertions, 21 deletions
diff --git a/week1/camil/2.11/BottlesOfBeer.icl b/week1/camil/2.11/BottlesOfBeer.icl
deleted file mode 100644
index 70628a1..0000000
--- a/week1/camil/2.11/BottlesOfBeer.icl
+++ /dev/null
@@ -1,21 +0,0 @@
-module BottlesOfBeer
-
-import StdEnv
-
-Start = [(fst_line x +++ "\n" +++ snd_line x +++ "\n\n") \\ x <- [99,98..0]]
-
-fst_line :: Int -> String
-fst_line n = btl n True +++ wall +++ ", " +++ btl n False +++ " of beer."
-
-snd_line :: Int -> String
-snd_line 0 = "Go to the store and buy some more, " +++ btl 99 False +++ wall +++ "."
-snd_line n = "Take one down and pass it around, " +++ btl (n-1) False +++ wall +++ "."
-
-btl :: Int Bool -> String
-btl 0 True = "No more bottles"
-btl 0 False = "no more bottles"
-btl 1 b = "1 bottle"
-btl n b = toString n +++ " bottles"
-
-wall :: String
-wall = " of beer on the wall" \ No newline at end of file