mirror of
https://github.com/lexi-lambda/freer-simple.git
synced 2024-12-23 22:23:27 +03:00
Remove asks from examples.
This commit is contained in:
parent
f332bc71b0
commit
e1107cb059
@ -82,9 +82,6 @@ with 'runReader', how to access the Reader data with 'ask' and 'asks'.
|
||||
>
|
||||
>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.
|
||||
>isCountCorrect :: Bindings -> Bool
|
||||
>isCountCorrect bindings = run $ runReader calc_isCountCorrect bindings
|
||||
@ -121,9 +118,6 @@ Shows how to modify Reader content with 'local'.
|
||||
>
|
||||
> type Bindings = Map String Int
|
||||
>
|
||||
> asks :: (b -> a) -> Eff '[Reader b] a
|
||||
> asks f = ask >>= return . f
|
||||
>
|
||||
> calculateContentLen :: Eff '[Reader String] Int
|
||||
> calculateContentLen = do
|
||||
> content <- (ask :: Eff '[Reader String] String)
|
||||
|
Loading…
Reference in New Issue
Block a user