Skip to content

Instantly share code, notes, and snippets.

@softberries
Created June 24, 2020 05:55
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 softberries/0aee5f37dd17f19479b65716c0d71d9f to your computer and use it in GitHub Desktop.
Save softberries/0aee5f37dd17f19479b65716c0d71d9f to your computer and use it in GitHub Desktop.
def modifyShared(trace: Ref[IO, Shared], msg: String): IO[Unit] = {
for {
sh <- trace.get()
_ <- trace.set(Shared(sh, msg))
} yield ()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment