From e16dfcf0e060a2a2198136e57313af474586f2bd Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 21 Sep 2014 06:51:36 -0400 Subject: [PATCH] More functions for chapter 1 --- lyahfgg/boombangs.hs | 1 + lyahfgg/hilarity.hs | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 lyahfgg/boombangs.hs create mode 100644 lyahfgg/hilarity.hs diff --git a/lyahfgg/boombangs.hs b/lyahfgg/boombangs.hs new file mode 100644 index 0000000..f9c17b8 --- /dev/null +++ b/lyahfgg/boombangs.hs @@ -0,0 +1 @@ +boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] diff --git a/lyahfgg/hilarity.hs b/lyahfgg/hilarity.hs new file mode 100644 index 0000000..8ffa1d3 --- /dev/null +++ b/lyahfgg/hilarity.hs @@ -0,0 +1,2 @@ +adjNounHilarity adjectives nouns = + [adjective ++ " " ++ noun | adjective <- adjectives, noun <- nouns]