keen/col/mut-grid
Sourcemake[t] t mut-grid(width nat64, height nat64, f t mut((nat64, nat64)))Creates a new grid, setting every element to
f[x, y].show[t] string(a t mut-grid) t showReturns a string with one line for each row. Each row will have a space in between columns.
This makes no attempt to add padding to ensure columns line up.
mut-grid-rows[t] record (has private fields)with-coords[t] record
Mutable grid (matrix) type. This is intended for data that happens to fall in a grid; it may not be ideal for linear algebra.
This is row-major, meaning rows are stored contiguously. So, iteration functions typically start with the top row left-to-right, then the second row left-to-right, etc.
Grid elements are mutable, but changing the width or height is not supported.