From eaeca81b659d4c5cb39b7e22d37e32df729d7309 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 1 May 2017 22:06:40 -0700 Subject: [PATCH] Part 1 -- baby steps --- baby.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 baby.hs diff --git a/baby.hs b/baby.hs new file mode 100644 index 0000000..8c03644 --- /dev/null +++ b/baby.hs @@ -0,0 +1,10 @@ +-- baby.hs +-- Eryn Wells + +-- 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]]