This commit is contained in:
2026-09-23 00:36:22 -04:00
commit 6e4f9cd65a
74 changed files with 57163 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
Location :: |{
unknown
known: (f32, f32)
}
describe: Location -> str: @ location: Location { match location {
|.unknown => 'unknown'
|.known (latitude, longitude) if latitude >= 0.0 => 'known'
|.known (_, _) => 'known'
} }
Point :: &{
x: i32:
y: i32:
}
sum_point: Point -> i32: @ point: Point {
{x as horizontal, y as vertical} :: point
horizontal + vertical
}
classify_array: []i32 -> str: @ values: []i32 { match values {
[] => 'empty'
[only] => 'one'
[first, ...rest] => 'many'
} }