Skip to content

Instantly share code, notes, and snippets.

@arkadius
Created August 4, 2014 20:24
Show Gist options
  • Save arkadius/53cca488269cc83ef7d6 to your computer and use it in GitHub Desktop.
Save arkadius/53cca488269cc83ef7d6 to your computer and use it in GitHub Desktop.
val chain =
Phase("Preparation") { in: Int => PreparedData(in) } ::
Phase("Validation") { data: PreparedData => ValidatedData(data) } ::
Phase("Execution") { data: ValidatedData => Result(data) } ::
NilChain()
val progress = new MultiPhasedProgress(chain)
val result = progress.run(123)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment