2019-02-16 15:42:20 +01:00
|
|
|
#![feature(core_intrinsics)]
|
|
|
|
|
2019-02-11 19:40:07 +01:00
|
|
|
use std::io::Write;
|
|
|
|
|
|
|
|
fn main() {
|
2019-06-27 20:49:39 +02:00
|
|
|
assert_eq!((1u128 + 2) as u16, 3);
|
2019-02-16 17:18:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(PartialEq)]
|
|
|
|
enum LoopState {
|
|
|
|
Continue(()),
|
|
|
|
Break(())
|
2019-02-11 19:40:07 +01:00
|
|
|
}
|
2019-06-23 15:14:26 +02:00
|
|
|
|
|
|
|
pub enum Instruction {
|
|
|
|
Increment,
|
|
|
|
Loop,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn map(a: Option<(u8, Box<Instruction>)>) -> Option<Box<Instruction>> {
|
|
|
|
match a {
|
|
|
|
None => None,
|
|
|
|
Some((_, instr)) => Some(instr),
|
|
|
|
}
|
|
|
|
}
|