ref: 2789d6a7b1965dc6902028a810c38a3a0a4c37dd
dir: /test/genericchain.myr/
use std
generic fail = {val : @a
-> `std.Some val
}
generic try = {opt : std.option(@b)
match opt
| `std.Some v: -> v
| `std.None: std.die("Badness\n")
;;
}
const main = {
std.put("val = %i\n", try(fail(123)))
}