Skip to content

Instantly share code, notes, and snippets.

@wfaler
wfaler / gist:3778139
Created September 24, 2012 20:24 — forked from seanparsons/gist:3761731
Playing with lenses.
// Note this requires scalaz-core 7.0 added to the classpath.
import scalaz._
import Scalaz._
import Lens._
case class Address(street: String, country: String)
case class User(name: String, address: Address)
val address = Address("Monkey Street", "England")
val user = User("Sean", address)