Skip to content

Instantly share code, notes, and snippets.

@alandipert
Forked from anonymous/Step.scala
Created May 31, 2009 04:54
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 alandipert/120766 to your computer and use it in GitHub Desktop.
Save alandipert/120766 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))
}
//[error] /Users/alan/Projects/scala/step/./src/main/scala/Step.scala:34: type mismatch;
//[error] found : List[(String, Array[String])]
//[error] required: Map[String,Array[String]]
//[error] pair <- path.split('/').toList.tail.zipWithIndex.filter(part => placeholders.exists(place => part._2 == place))
//[error] ^
//[error] one error found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment