From 225260b8c1a9cbf15ccf9cd343d5106b3fe9aee1 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 2 Sep 2023 09:43:51 -0700 Subject: [PATCH] This is Scala 2 yo, we need brackets --- docs/std/random.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/std/random.md b/docs/std/random.md index 98d2bcfd39..730ab16f3a 100644 --- a/docs/std/random.md +++ b/docs/std/random.md @@ -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 } ```