From 9c64645287c18ed2a73b542f10940b37dd178d72 Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Fri, 2 Mar 2018 09:03:48 +0100 Subject: [PATCH] fix typo strNumber => streetNumber --- src/main/scala/monocle/LensExercises.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/scala/monocle/LensExercises.scala b/src/main/scala/monocle/LensExercises.scala index ce7c1ad..23c2a61 100644 --- a/src/main/scala/monocle/LensExercises.scala +++ b/src/main/scala/monocle/LensExercises.scala @@ -33,23 +33,23 @@ object LensHelper { * * Let’s take a simple case class with two fields: * {{{ - * case class Address(strNumber: Int, streetName: String) + * case class Address(streetNumber: Int, streetName: String) * }}} * - * We can create a `Lens[Address, Int]` which zooms from an `Address` to its field `strNumber` by supplying a pair of functions: + * We can create a `Lens[Address, Int]` which zooms from an `Address` to its field `streetNumber` by supplying a pair of functions: * * - `get: Address => Int` * - `set: Int => Address => Address` * * {{{ * import monocle.Lens - * val strNumber = Lens[Address, Int](_.strNumber)(n => a => a.copy(strNumber = n)) + * val streetNumber = Lens[Address, Int](_.streetNumber)(n => a => a.copy(streetNumber = n)) * }}} * * This case is really straightforward so we automated the generation of `Lenses` from case classes using a macro: * {{{ * import monocle.macros.GenLens - * val strNumber = GenLens[Address](_.strNumber) + * val streetNumber = GenLens[Address](_.streetNumber) * }}} * * @param name lens @@ -107,7 +107,7 @@ object LensExercises extends FlatSpec with Matchers with Section { * def updateNumber(n: Int): Future[Int] = Future.successful(n + 1) * }}} * {{{ - * strNumber.modifyF(updateNumber)(address) + * streetNumber.modifyF(updateNumber)(address) * // res9: scala.concurrent.Future[Address] = Future() * }}} *