Skip to content

Commit

Permalink
This is Scala 2 yo, we need brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge authored Sep 2, 2023
1 parent 6a4dcfe commit 225260b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/std/random.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ object Magic {
def getMagicNumber[F[_] : Monad](
mult: Int
)(implicit randomizer: F[Random[F]]): F[String] =
for
for {
rand <- randomizer.flatMap(random => random.betweenInt(1, 11)) // 11 is excluded
number = rand * mult
msg = s"the magic number is: $number"
yield msg
} yield msg
}
```

Expand Down

0 comments on commit 225260b

Please sign in to comment.