Skip to content

Instantly share code, notes, and snippets.

@airicbear
Last active June 16, 2019 00:48
Show Gist options
  • Save airicbear/882a7ad65007bcf097723b75a94fd7b1 to your computer and use it in GitHub Desktop.
Save airicbear/882a7ad65007bcf097723b75a94fd7b1 to your computer and use it in GitHub Desktop.
doubleMe x = x + x
doubleUs x y = x*2 + y*2
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!"
boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x ]
removeNonUppercase st = [ c | c <- st, c `elem` ['A'..'Z'] ]
listOfListsEvens xxs = [ [ x | x <- xs, even x ] | xs <- xxs ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment