Created
October 13, 2019 16:17
-
-
Save christineponyl/76f9eb722e5bb220476e93abc78070d4 to your computer and use it in GitHub Desktop.
Shared via Pony Playground (https://playground.ponylang.io/?gist=76f9eb722e5bb220476e93abc78070d4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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