Conway's Game of Life: Difference between revisions

Jump to navigation Jump to search
Line 124: Line 124:
└─────────┴─────────┴─────────┘
└─────────┴─────────┴─────────┘
</source>
</source>
Here <source lang=apl inline>currentGeneration</source> must be [[enclose]]d before applying the outer product so that it is treated as a single [[element]] rather than rotating each of its Boolean elements (which would have no effect).
=== Extending to two dimensions ===
=== Extending to two dimensions ===
Now we can use a similar trick but rotate up and down by using APL's First Axis Rotate function <source lang=apl inline>⊖</source>. Used with an Outer Product this gives us a series of 9 grids:
Now we can use a similar trick but rotate up and down by using APL's First Axis Rotate function <source lang=apl inline>⊖</source>. Used with an Outer Product this gives us a series of 9 grids:

Navigation menu