pub hkt Functor[Self] fn map(f: fn (t: T) -> U) -> Self end pub int Iterable fn iter() -> Iterator end pub int Iterator = () -> Option pub enum Option : Functor[Self] Some(T), None; fn unwrap() -> T self is Some(t) ? t : throw Exception('Empty Option') end fn expect(msg: String) -> T self is Some(t) ? t : throw Exception(msg) end impl Functor fn map(f: fn (t: T) -> U) -> Self self is Some(t) ? Some(f(t)) : None end end static fn lift(t: T) -> Self Some(t) end end