a dedicated method to set a new value of a field, instead of transforming the old value: modify(person)(_.).setTo("2 Imperative Dr.Review complete coverage of Halloween 2022 at to save big today at CouponKirin. This can be later used as follows: nameLens(person).using(_.toUpperCase). Other listings you may be interested in: Raid Fly Control System - Portable Cube Rating: 9.6 One Touch Magic OdorKiller Rating: 9.8 Primal Earth 24hr Moisturiser Rating: 9. Find the best Quicklens Halloween discounts, coupon codes and deals here. You can use this discount under certain conditions. added documentation on how to create lenses, that is a modification of a path parametrized by the actual object: val nameLens = modify(_: Person)(_.). Save up to 5 Per Box on Monthly Sale Items Apply discount exclusively to available items.You can add support for your own containers by providing an implicit QuicklensFunctor with the appropriate C type parameter (there are default implementations for List, Vector and Option). name )Ĭase class Address(street: Option)Ĭase class Person(addresses: List)Īddress(Some(Street("1 Functional Rd."))),Īddress(Some(Street("2 Imperative Dr."))) _ case class Street (name : String ) case class Address (street : Option ) case class Person (addresses : List ) val person = Person (List (Īddress (Some (Street ( "1 Functional Rd." ) ) ),Īddress (Some (Street ( "2 Imperative Dr." ) ) ) ) ) val newPerson = modify (person ) ( _.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |