Hello, I’m experimenting with Optics, and I have something like
Copy code
playerFlow.map { player ->
val firstNameLens = Player.name.first
firstNameLens.set(player, "John")
}
If I want to modify also the last name, is there a nicer way than this?
Copy code
playerFlow.map { player ->
val firstNameLens = Player.name.first
val lastNameLens = Player.name.last
val a = firstNameLens.set(player, "John")
lastNameLens.set(a, "Doe")
}