not sure where hello came from

This commit is contained in:
Sandy Maguire 2019-02-21 19:53:10 -05:00
parent 6004911550
commit 0b0e9c61f0

View File

@ -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)