Skip to content

Instantly share code, notes, and snippets.

@jeremyheiler
Last active March 3, 2016 02:38
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 jeremyheiler/876713b25536595c5d97 to your computer and use it in GitHub Desktop.
Save jeremyheiler/876713b25536595c5d97 to your computer and use it in GitHub Desktop.
class MyNotify
let env: Env
new create(env': Env) =>
env = env'
fun ref apply(data: Array[U8] iso) =>
env.out.print(consume data)
fun ref dispose() =>
None
actor Main
new create(env: Env) =>
env.input(recover iso MyNotify.create(env) end)
class MyNotify
let env: Env
new iso create(env': Env) =>
env = env'
fun ref apply(data: Array[U8] iso) =>
env.out.print(consume data)
fun ref dispose() =>
None
actor Main
new create(env: Env) =>
env.input(MyNotify.create(env))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment