schala/schala-lang/language/src/prelude.schala
2019-09-10 03:31:23 -07:00

15 lines
307 B
Plaintext

type Option<T> = Some(T) | None
type Ord = LT | EQ | GT
fn map(input: Option<T>, func: Func): Option<T> {
if input {
is Option::Some(x) -> Option::Some(func(x)),
is Option::None -> Option::None,
}
}
type Complicated = Sunrise | Metal { black: bool, norwegian: bool } | Fella(String, Int)