diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-10-07 09:41:38 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-10-07 09:41:38 +0100 |
| commit | c5d20d2eef6c25b23c2aa69cdc1dbc7ce7d6753a (patch) | |
| tree | 23c6a0a5badbf67634a000df4d856f384fc51176 /code | |
| parent | f40482aa29f687b4630744457844bad7f45ec614 (diff) | |
Demaybe operator ?
Diffstat (limited to 'code')
| -rw-r--r-- | code/demo.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/code/demo.odin b/code/demo.odin index 9b9566faa..786392b77 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -1,8 +1,9 @@ #import "fmt.odin" + main :: proc() { maybe_print :: proc(x: ?int) { - if v, ok := maybe_value(x); ok { + if v, ok := x?; ok { fmt.println(v) } else { fmt.println("nowt") |