Skip to content

Instantly share code, notes, and snippets.

@AlexBaranosky
Created October 6, 2011 00:09
Show Gist options
  • Save AlexBaranosky/1266130 to your computer and use it in GitHub Desktop.
Save AlexBaranosky/1266130 to your computer and use it in GitHub Desktop.
Sample
Writer(5, "").flatMap { num => Writer(num + 3, "added three")
.flatMap { Writer(_ * 5, "times five")}
// => Writer(40, "added threetimes 5")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment