Skip to content

Instantly share code, notes, and snippets.

Created May 31, 2009 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/120765 to your computer and use it in GitHub Desktop.
Save anonymous/120765 to your computer and use it in GitHub Desktop.
def parseParams(path:String):Map[String,Array[String]] = {
for {
pair <- path.split('/').toList.tail.zipWithIndex.filter(part => placeholders.exists(place => part._2 == place))
} yield (parts(pair._2) -> Array(pair._1))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment