From e285e81c2519dfe9b000d0f297b72c6c9909662d Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Fri, 8 Aug 2014 14:37:06 +0800 Subject: Last few chapters in LYHGG --- addStuff.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 addStuff.hs (limited to 'addStuff.hs') diff --git a/addStuff.hs b/addStuff.hs new file mode 100644 index 0000000..d440f7e --- /dev/null +++ b/addStuff.hs @@ -0,0 +1,12 @@ +import Control.Monad.Instances + +addStuff :: Int -> Int +addStuff = do + a <- (*2) + b <- (+10) + return (a+b) + +complexOp = do + a <- sqrt + b <- log . (**2) + return (a+b) -- cgit v1.2.3-70-g09d2