Skip to content

Instantly share code, notes, and snippets.

@jamesgolick
Created March 19, 2010 00:57
Show Gist options
  • Select an option

  • Save jamesgolick/337110 to your computer and use it in GitHub Desktop.

Select an option

Save jamesgolick/337110 to your computer and use it in GitHub Desktop.
implicit def map2ColumnMap[A <% Array[Byte], B <% Array[Byte]](map: Map[A, B]):
Map[Array[Byte], Array[Byte]] = {
map.foldLeft(Map[Array[Byte], Array[Byte]]()) { (map, kv) =>
map + Tuple2[Array[Byte], Array[Byte]](kv._1, kv._2)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment