Provides an ergonomic and fast way to use square 2 dimensional arrays in Elm.
Attempts to create a SquareArray2D from an Array of Arrays representing rows.
Returns Nothing when the elements don't form a square.
Attempts to create a SquareArray2D from an Array of Arrays representing columns.
Returns Nothing when the elements don't form a square.
Attempts to create a SquareArray2D from an Array of elements and a side length.
Orders the elements in row major order.
The array has to be the same length as the provided side length squared.
Creates a SquareArray2D with the sideLength.
Each element is created using the provided function which gives the index (row and column).
Creates a SquareArray2D with a provided side length and fills it with an element.
Gets the side length of the SquareArray2D.
Gets the total number of elements the SquareArray2D holds.
Gets an element from the SquareArray2D at the provided row and column.
Returns Nothing when the index is out of bounds.
Sets an element in the SquareArray2D at the provided row and column.
Returns the SquareArray2D unchanged if the index is out of bounds.
Updates an element in the SquareArray2D with a function at the provided row and column.
Returns the SquareArray2D unchanged if the index is out of bounds.
Applies a function to every element in the SquareArray2D.
Applies a function to every element in the SquareArray2D.
The index (row and column) are provided to the mapping function.
Flattens the SquareArray2D in row major order.
Generates a SquareArray2D where each value is randomly generated.
Type representing a 2 dimensional square array.