Skip to content

Instantly share code, notes, and snippets.

@debasishg
Created August 13, 2011 10:37
Show Gist options
  • Save debasishg/1143727 to your computer and use it in GitHub Desktop.
Save debasishg/1143727 to your computer and use it in GitHub Desktop.
bite sized code gives 100X performance on a huge computation set ..
def onTrades[T](trades: List[Trade])(fn: Trade => T) =
Future.traverse(trades) {trade =>
Future { fn(trade) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment