diff --git a/lyahfgg/baby.hs b/lyahfgg/baby.hs index e81eb5e..352d1ed 100644 --- a/lyahfgg/baby.hs +++ b/lyahfgg/baby.hs @@ -7,3 +7,9 @@ doubleSmallNumber x = if x > 100 else x*2 doubleSmallNumber' x = (if x > 100 then x else x*2) + 1 + +boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] + +length' xs = sum [1 | _ <- xs] + +removeNonUppercase st = [c | c <- st, c `elem` ['A'..'Z']]