From 18376aa6e41aac0b7df266841dbeb28aec2826b4 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 2 Apr 2012 23:36:30 -0400 Subject: [PATCH] more and more functions --- lyahfgg/baby.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lyahfgg/baby.hs b/lyahfgg/baby.hs index 352d1ed..1160317 100644 --- a/lyahfgg/baby.hs +++ b/lyahfgg/baby.hs @@ -12,4 +12,11 @@ boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] length' xs = sum [1 | _ <- xs] +removeNonUppercase :: [Char] -> [Char] removeNonUppercase st = [c | c <- st, c `elem` ['A'..'Z']] + +circumference :: Float -> Float +circumference r = 2 * pi * r + +circumference' :: Double -> Double +circumference' r = 2 * pi * r