Skip to content

Instantly share code, notes, and snippets.

@fuine
fuine / lady.rs
Last active December 28, 2016 11:49
Old lady swallowed the fly in rust
#[derive(PartialEq)]
enum Action { Once, Every, Die }
fn main() {
let animals = [
("horse", Action::Die, "She's dead, of course!"),
("donkey", Action::Once, "It was rather wonky. To swallow a donkey."),
("cow", Action::Once, "I don't know how. To swallow a cow."),
("goat", Action::Once, "She just opened her throat. To swallow a goat."),
("pig", Action::Once, "Her mouth was so big. To swallow a pig."),