#[lang = "sized"] pub trait Sized {} pub enum Option { Some(T), None, } pub use Option::{None, Some}; #[lang = "fn_once"] pub trait FnOnce { #[lang = "fn_once_output"] type Output; extern "rust-call" fn call_once(self, args: Args) -> Self::Output; } impl Option { pub fn map R>(self, f: F) -> Option { match self { Some(value) => Some(f(value)), None => None, } } }