Skip to content

Instantly share code, notes, and snippets.

@ShimmerFairy
Created January 17, 2011 22:03
Show Gist options
  • Save ShimmerFairy/783583 to your computer and use it in GitHub Desktop.
Save ShimmerFairy/783583 to your computer and use it in GitHub Desktop.
Quantum Mechanics explained
class QuantumMechanics is Nature {
# Nature has $experiment
method new($experiment) {
self.bless(*, :$experiment);
}
method sane() {
no; # Nature contains this as an enum
}
method experiments() {
given $experiment.lc {
when "schrödinger" {
...
}
...
}
}
...
}
my QuantumMechanics $experiment .= new("double-slit");
(say $experiment.run) xx 10; # output is completely insane.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment