Skip to content

Instantly share code, notes, and snippets.

@marick
Created April 18, 2010 16:38
Show Gist options
  • Save marick/370348 to your computer and use it in GitHub Desktop.
Save marick/370348 to your computer and use it in GitHub Desktop.
(def *horizontal-blinker* [ [0,1] [1,1], [2,1] ])
(def *vertical-blinker* [ [1,2]
[1,1]
[1,0] ])
(example "of blinkers blinking"
(next-world horizontal-blinker) =>? vertical-blinker
(next-world vertical-blinker) =>? horizontal-blinker
(pipeline (next-world ...life...) => ...a-next-world...
because
(relevant-neighborhood ...life...) => ...life-surrounded-by-dead-cells...
(propagate ...life-surrounded-by-dead-cells...) => ...live-and-dead-cells...
(discard-death ...live-and-dead-cells...) => ...a-next-world...
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment