Skip to content

Commit 58bc91a

Browse files
ozkutukmilesfrain
andauthored
Fix State type typo in Chapter 11 (#210)
* Fix `State` type typo in Chapter 11 * additional consistency Co-authored-by: milesfrain <[email protected]>
1 parent 96daf6e commit 58bc91a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/chapter11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ modify_ :: forall s. (s -> s) -> State s Unit
101101

102102
Note that these API signatures are presented in a simplified form using the `State` type constructor for now. The actual API involves `MonadState` which we'll cover in the later "Type Classes" section of this chapter, so don't worry if you see different signatures in your IDE tooltips or on Pursuit.
103103

104-
Let's see an example. One use of the `State` monad might be to add the values in an array of numbers to the current state. We could do that by choosing `Number` as the state type `s`, and using `traverse_` to traverse the array, with a call to `modify` for each array element:
104+
Let's see an example. One use of the `State` monad might be to add the values in an array of integers to the current state. We could do that by choosing `Int` as the state type `s`, and using `traverse_` to traverse the array, with a call to `modify` for each array element:
105105

106106
```haskell
107107
import Data.Foldable (traverse_)

0 commit comments

Comments
 (0)