Organizing by chapter maybe?
This commit is contained in:
11
lyahfgg/ch01/baby.hs
Normal file
11
lyahfgg/ch01/baby.hs
Normal file
@@ -0,0 +1,11 @@
|
||||
doubleMe x = x + x
|
||||
|
||||
doubleUs x y = doubleMe x + doubleMe y
|
||||
|
||||
doubleSmallNumber x = if x > 100
|
||||
then x
|
||||
else x*2
|
||||
|
||||
doubleSmallNumber' x = (if x > 100 then x else x*2) + 1
|
||||
|
||||
conanO'Brien = "It's a-me, Conan O'Brien!"
|
1
lyahfgg/ch01/boombangs.hs
Normal file
1
lyahfgg/ch01/boombangs.hs
Normal file
@@ -0,0 +1 @@
|
||||
boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x]
|
2
lyahfgg/ch01/hilarity.hs
Normal file
2
lyahfgg/ch01/hilarity.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
adjNounHilarity adjectives nouns =
|
||||
[adjective ++ " " ++ noun | adjective <- adjectives, noun <- nouns]
|
Reference in New Issue
Block a user