box-o-sand/lyahfgg/ch01/boombangs.hs

2 lines
70 B
Haskell

boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x]