Skip to content

Instantly share code, notes, and snippets.

@rirakkumya
Created March 31, 2013 07:52
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/5279919 to your computer and use it in GitHub Desktop.
Save rirakkumya/5279919 to your computer and use it in GitHub Desktop.
case class Address(zip:List[String])
object Addr {
type 住所 = Address
type 郵便番号 = String
def zip:住所 => List[郵便番号] = _.zip
}
List(Address(List("100-0001","100-0002"))) map Addr.zip
//->List[List[Addr.郵便番号]] = List(List(100-0001, 100-0002))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment