// Simple Game of Life test
// Safe array access
at : xs i ->
when (i >= 0 and i < length xs) is
true then slice xs i (i + 1).0
_ then 0;
// Test pattern
pattern : [[0, 1, 0], [0, 0, 1], [1, 1, 1]];
io.out "Testing:";
io.out pattern;
io.out "Cell at (1,1):";
io.out (at (at pattern 1) 1);
io.out "Done!";