Files
orchid/examples/match/main.orc
Lawrence Bethlenfalvy a8887227e5 Backup commit
My backspace key started ghosting. Nothing works atm.
2024-01-27 14:50:33 +00:00

24 lines
450 B
Plaintext

import std::(conv, reflect)
const foo := t[option::some "world!", option::none]
const test1 := match foo {
t[option::some balh, option::none] => balh;
}
const bar := map::new[
"age" = 22,
"name" = "lbfalvy",
"is_alive" = true,
"species" = "human",
"greeting" = "Hello"
]
const test2 := match bar {
map::having ["is_alive" = true, "greeting" = foo] => foo
}
const tests := test2 ++ ", " ++ test1
const main := conv::to_string bar