Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djspiewak/468ea0b9644938fc20ec to your computer and use it in GitHub Desktop.
Save djspiewak/468ea0b9644938fc20ec to your computer and use it in GitHub Desktop.
scala> val M = implicitly[Monad[Task]]
M: scalaz.Monad[scalaz.concurrent.Task] = scalaz.concurrent.Task$$anon$1@d55df51
scala> var x = 0
x: Int = 0
scala> M point { x += 1 }
res0: scalaz.concurrent.Task[Unit] = scalaz.concurrent.Task@3f4898c5
scala> x
res1: Int = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment