Monocle
Monocle copied to clipboard
NamedTuple support
Scala 3.5.0 introduced NamedTuples. I think Moncle should add support for them. Example:
val nt: NamedTuple[("b", "e", "d"), (Boolean, Boolean, Int)] = (b = false, e = true, d = 3)
val ntModified = nt.focus(_.e).replace(true)
I found they plan to support this: https://contributors.scala-lang.org/t/named-tuples-field-updating/7116/16 Not sure if monocle's version will be more efficient or they can be equivalent?