A short daily dose of scala examples and occasionally explanations.
scala> List(1,2) map (Map(1->"one",2->"two"))res0: List[java.lang.String] = List(one, two)scala> List(3,3,2) map (List('a', 'b', 'c','d'))res2: List[Char] = List(d, d, c)
Nice trick. This works for Array and Set as well.Nice blog btw!
Nice trick. This works for Array and Set as well.
ReplyDeleteNice blog btw!