https://github.com/perty/matrix
Two dimensional matrix backed by Array from the Elm core, the fast immutable array implementation.
https://github.com/perty/matrix
Last synced: 3 months ago
JSON representation
Two dimensional matrix backed by Array from the Elm core, the fast immutable array implementation.
- Host: GitHub
- URL: https://github.com/perty/matrix
- Owner: perty
- License: apache-2.0
- Created: 2021-06-26T18:50:22.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T17:25:30.000Z (over 3 years ago)
- Last Synced: 2025-01-18T18:39:09.721Z (over 1 year ago)
- Language: Elm
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Matrix
Two-dimensional matrix backed by Array from the Elm core, the fast immutable array
implementation.
The main motivation for this is the `indexedMap` function that is useful in games where you
want to act depending on position as well as content. E.g., the game of life where the cell
is depending on its neighbours.
Speaking of `neighbours`, that is also a function in this package.
### Version 2.0.0
API design follows the Elm core Array module.
Naming is now rows and columns, as it is more fit to the purpose of the library.
New function foldl for folding left over each row and then merge.