Merge branch 'topic/remove_asks' into 'master'

Remove asks from examples.



See merge request !6
This commit is contained in:
Allele Dev 2016-04-21 00:50:24 +00:00
commit ba71d26a16

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)