Skip to content

Instantly share code, notes, and snippets.

@josephpconley
Created March 4, 2014 12:37
Show Gist options
  • Save josephpconley/9345730 to your computer and use it in GitHub Desktop.
Save josephpconley/9345730 to your computer and use it in GitHub Desktop.
//Stand-alone logging
def editUser = Logged {
val result = User.edit
Ok(result.toString)
}
//Stand-alone measured
def calc = Measured {
//calculate pi using taylor series
val result = Pi.calculate(1000)
Ok(result.toString)
}
//Composed
def batch = Logged {
Measured {
val result = User.batchUpload
Ok(result.toString)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment