From 5d3ed2ad872ae4003225d65be8197cf3029a27b5 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 2 Apr 2012 22:35:25 -0400 Subject: [PATCH] more functions --- lyahfgg/baby.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lyahfgg/baby.hs b/lyahfgg/baby.hs index 3c5b6bb..e81eb5e 100644 --- a/lyahfgg/baby.hs +++ b/lyahfgg/baby.hs @@ -1,3 +1,9 @@ doubleMe x = x + x -doubleUs x y = x*2 + y*2 +doubleUs x y = doubleMe x + doubleMe y + +doubleSmallNumber x = if x > 100 + then x + else x*2 + +doubleSmallNumber' x = (if x > 100 then x else x*2) + 1