Skip to content

Instantly share code, notes, and snippets.

@christineponyl
Created October 13, 2019 16:17
Show Gist options
  • Save christineponyl/76f9eb722e5bb220476e93abc78070d4 to your computer and use it in GitHub Desktop.
Save christineponyl/76f9eb722e5bb220476e93abc78070d4 to your computer and use it in GitHub Desktop.
actor Main
let foo: (Foo|None)
new create(env: Env) =>
try
foo = Foo()?
else
env.err.print("Something went wrong!")
env.exitcode(1)
end
fun later() =>
match foo // ugly, unnecessary
|
let f: Foo => other()
|
None => None // this will never match
end
fun other() => None
class Foo
new create() ? => None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment