News for hackers. Stuff that matters.
Re:Escape from Callback Hell: Callbacks are the modern goto by saryant on Friday November 02, 2012 @02:58PM (#4734203)
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))
      )
    }

There are no comments on this comment yet.