2019-09-25 02:54:56 -07:00
|
|
|
let _SCHALA_VERSION = "0.1.0"
|
2018-11-05 20:55:03 -08:00
|
|
|
|
|
|
|
type Option<T> = Some(T) | None
|
|
|
|
type Ord = LT | EQ | GT
|
2018-11-06 03:02:32 -08:00
|
|
|
|
|
|
|
|
|
|
|
fn map(input: Option<T>, func: Func): Option<T> {
|
|
|
|
if input {
|
2019-09-10 03:31:23 -07:00
|
|
|
is Option::Some(x) -> Option::Some(func(x)),
|
|
|
|
is Option::None -> Option::None,
|
2018-11-06 03:02:32 -08:00
|
|
|
}
|
|
|
|
}
|
2019-08-12 11:33:03 -07:00
|
|
|
|
|
|
|
type Complicated = Sunrise | Metal { black: bool, norwegian: bool } | Fella(String, Int)
|