Skip to content

Instantly share code, notes, and snippets.

@wende
Forked from Hajto/gist:07ebc47269e8edd6f249
Last active August 29, 2015 14:23
Show Gist options
  • Save wende/6f185a2c805e04598cb9 to your computer and use it in GitHub Desktop.
Save wende/6f185a2c805e04598cb9 to your computer and use it in GitHub Desktop.
selectMaps($()).map { elem =>
elem.map { jsValue =>
jsValue.validate[Level].get
}: List[Level]
}.collect {
case (list: List[Level]) => Ok(views.html.levelChooser(list))
}
(for ( elem <- selectMaps($())
jsValue <- elem
valid <- jsValue.validate) yield valid)
.map {list => Ok(views.html.levelChooser(list)) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment