Skip to content

Commit

Permalink
Fix typo (#3181)
Browse files Browse the repository at this point in the history
nextBoolean correctly implemented initially, then second occurrence would be false biased (ever so slightly!)
  • Loading branch information
msinton authored and LukaJCB committed Dec 3, 2019
1 parent d4f8bd7 commit b3bc539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/main/tut/datatypes/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The `map` method on `State` allows us to transform the `A` value without affecti

```tut:silent
val nextBoolean: State[Seed, Boolean] = nextLong.map(long =>
long > 0)
long >= 0)
```

The `flatMap` method on `State[S, A]` lets you use the result of one `State` in a subsequent `State`. The updated state (`S`) after the first call is passed into the second call. These `flatMap` and `map` methods allow us to use `State` in for-comprehensions:
Expand Down Expand Up @@ -312,4 +312,4 @@ valid.run(Open)

```tut:book
valid.run(Closed)
```
```

0 comments on commit b3bc539

Please sign in to comment.