Part 1 -- baby steps

This commit is contained in:
Eryn Wells 2017-05-01 22:06:40 -07:00
parent f3a5289c72
commit eaeca81b65

10
baby.hs Normal file
View file

@ -0,0 +1,10 @@
-- baby.hs
-- Eryn Wells <eryn@erynwells.me>
-- Simple functions
doubleMe x = x + x
doubleUs x y = doubleMe x + doubleMe y
boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x]
-- List comprehensions
triangles = [(a,b,c) | c <- [1..10], b <- [1..10], a <- [1..10]]