Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// define Lens operating on whole of type Street and specific of type String
val nameLens = Lens.apply[Street, String](street => => street => street.copy(name = newName))
// nameLens: monocle.Lens[Street,String] = monocle.PLens$$anon$7@6cee061c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment