Created
March 31, 2013 07:52
-
-
Save rirakkumya/5279919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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