|
|
|
|
|
by saryant
4981 days ago
|
|
Similar to this is the Scala fold convention. An example from the Play! Framework for form submissions: def submit = Action { implicit request =>
contactForm.bindFromRequest.fold(
errors => BadRequest(html.contact.form(errors)),
contact => Ok(html.contact.summary(contact))
)
}
|
|