From 0b0e9c61f0ce72644bf7d80c1417727ea6b45971 Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Thu, 21 Feb 2019 19:53:10 -0500 Subject: [PATCH] not sure where hello came from --- src/Wtf.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Wtf.hs b/src/Wtf.hs index f388447..a5d8fe9 100644 --- a/src/Wtf.hs +++ b/src/Wtf.hs @@ -7,9 +7,9 @@ import Eff.Type import Data.Functor.Identity countDown :: Int -> Int -countDown start = fst $ fst $ run $ runState "hello" $ runState start go +countDown start = fst $ run $ runState start go where - go :: Eff '[State Int, State String, Identity] Int + go :: Eff '[State Int, Identity] Int go = get >>= (\n -> if n <= 0 then (pure n) else (put (n-1)) >> go)