Skip to content

Instantly share code, notes, and snippets.

@rirakkumya
Last active December 15, 2015 15:09
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 rirakkumya/5279694 to your computer and use it in GitHub Desktop.
Save rirakkumya/5279694 to your computer and use it in GitHub Desktop.
import Addr._
def lift(f: 住所 => 郵便番号): Option[住所] => Option[郵便番号] = _ map f
lift(Addr.zip)(Some(Address("100-1000")))
// -> Option[Addr.郵便番号] = Some(100-1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment