Skip to content

Commit 6b42001

Browse files
authored
Merge pull request #162 from meipp/meipp/fix-lambda-docs
fix lambda docs
2 parents f3bb5d7 + 446d192 commit 6b42001

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Control/Monad/Accum.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ import Data.Kind (Type)
125125
--
126126
-- 1. @'accum' ('const' (x, 'mempty'))@ @=@ @'pure' x@
127127
-- 2. @'accum' f '*>' 'accum' g@ @=@
128-
-- @'accum' '$' \acc -> let (_, v) = f acc
128+
-- @'accum' '$' \\acc -> let (_, v) = f acc
129129
-- (res, w) = g (acc '<>' v) in (res, v '<>' w)@
130130
--
131131
-- If you choose to define 'look' and 'add' instead, their definitions must obey
@@ -134,14 +134,14 @@ import Data.Kind (Type)
134134
-- 1. @'look' '*>' 'look'@ @=@ @'look'@
135135
-- 2. @'add' 'mempty'@ @=@ @'pure' ()@
136136
-- 3. @'add' x '*>' 'add' y@ @=@ @'add' (x '<>' y)@
137-
-- 4. @'add' x '*>' 'look'@ @=@ @'look' '>>=' \w -> 'add' x '$>' w '<>' x@
137+
-- 4. @'add' x '*>' 'look'@ @=@ @'look' '>>=' \\w -> 'add' x '$>' w '<>' x@
138138
--
139139
-- If you want to define both, the relationship between them is as follows.
140140
-- These are also the default definitions.
141141
--
142-
-- 1. @'look'@ @=@ @'accum' '$' \acc -> (acc, mempty)@
143-
-- 2. @'add' x@ @=@ @'accum' '$' \acc -> ('()', x)@
144-
-- 3. @'accum' f@ @=@ @'look' >>= \acc -> let (res, v) = f acc in 'add' v '$>' res@
142+
-- 1. @'look'@ @=@ @'accum' '$' \\acc -> (acc, mempty)@
143+
-- 2. @'add' x@ @=@ @'accum' '$' \\acc -> ('()', x)@
144+
-- 3. @'accum' f@ @=@ @'look' >>= \\acc -> let (res, v) = f acc in 'add' v '$>' res@
145145
--
146146
-- @since 2.3
147147
class (Monoid w, Monad m) => MonadAccum w m | m -> w where

Control/Monad/Cont/Class.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ label_ = callCC $ return . fix
196196
-- provided that @f@ is quasi-algebraic. More specifically, for any @g@, we must have:
197197
--
198198
-- @
199-
-- 'join' '$' f (\exit -> 'pure' '$' g (exit '.' 'pure') = f g
199+
-- 'join' '$' f (\\exit -> 'pure' '$' g (exit '.' 'pure') = f g
200200
-- @
201201
--
202202
-- 'ContT.callCC' is quasi-algebraic; furthermore, for any quasi-algebraic @f@,

0 commit comments

Comments
 (0)