Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-11-19 04:54:17 -06:00
commit f086abcea6
789 files changed
+149185

No files matched your search

@@ -0,0 +1,8 @@
import std::io;
def bumped(m: maybe<int>): int { return m is some(v) ? v + 1 : 0; }
def doubled(m: maybe<int>): int { return m is not some(v) ? -1 : v * 2; }
def main(): void {
val none: maybe<int> = nothing {};
val four: maybe<int> = maybe::<int>{ some = 4 };
println($"{bumped(four)} {bumped(none)} {doubled(four)} {doubled(none)}");
}