Skip to content

Instantly share code, notes, and snippets.

@lu4nm3
Created May 16, 2020 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lu4nm3/a9024d97cb5da2b64c98f7451b193ed9 to your computer and use it in GitHub Desktop.
Save lu4nm3/a9024d97cb5da2b64c98f7451b193ed9 to your computer and use it in GitHub Desktop.
scala> val emailAddress = EmailAddress("luis@example.com")
emailAddress: Either[String,EmailAddress] = Right(EmailAddress(luis@example.com))
scala> emailAddress.map(_.copy(emailAddress = "@example.com"))
res0: scala.util.Either[String,EmailAddress] = Right(EmailAddress(@example.com))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment