Remove asks from examples.

This commit is contained in:
Tim McGilchrist 2016-04-21 08:58:47 +10:00
parent f332bc71b0
commit e1107cb059

View File

@ -82,9 +82,6 @@ with 'runReader', how to access the Reader data with 'ask' and 'asks'.
> >
>type Bindings = Map String Int >type Bindings = Map String Int
> >
>asks :: (b -> a) -> Eff '[Reader b] a
>asks f = ask >>= return . f
>
>-- Returns True if the "count" variable contains correct bindings size. >-- Returns True if the "count" variable contains correct bindings size.
>isCountCorrect :: Bindings -> Bool >isCountCorrect :: Bindings -> Bool
>isCountCorrect bindings = run $ runReader calc_isCountCorrect bindings >isCountCorrect bindings = run $ runReader calc_isCountCorrect bindings
@ -121,9 +118,6 @@ Shows how to modify Reader content with 'local'.
> >
> type Bindings = Map String Int > type Bindings = Map String Int
> >
> asks :: (b -> a) -> Eff '[Reader b] a
> asks f = ask >>= return . f
>
> calculateContentLen :: Eff '[Reader String] Int > calculateContentLen :: Eff '[Reader String] Int
> calculateContentLen = do > calculateContentLen = do
> content <- (ask :: Eff '[Reader String] String) > content <- (ask :: Eff '[Reader String] String)