On Wednesday, 5 June 2024 at 10:27:47 UTC, Nick Treleaven wrote:
   foreach (i, row; maze)
       slices[i] = row;

Sorry that assignment was wrong (edited at last minute). Fixed:

```d
import std.stdio;
alias s_cell = int;

void main()
{  writeln("Maze generation demo");

   s_cell [5][5] maze;
   int n;
   foreach (i, row; maze)
        foreach (j, col; row)
            maze[i][j] = n++;

   s_cell[][5] slices;
   foreach (i, _; maze)
       slices[i] = maze[i];

   print_maze (slices);
}

void print_maze ( s_cell [][] maze )
{
    foreach (a; maze)
        a.writeln();
}
```

Reply via email to