Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upProposal: Immutable "flat" arrays #620
Comments
Skinney
closed this
Jul 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Skinney commentedMay 22, 2016
•
edited
Edited 1 time
-
Skinney
edited May 22, 2016 (most recent)
We currently have immutable RRB trees in Core, but for certain use cases, a simple copy-on-write array would be very nice. I could probably do the implementation myself and submit as a PR, but I would like to know if it is something that would get serious consideration first.
Implementation would be very basic (initialize, map, filter, get, set, push, pop) and would map to very simple JS calls.
This would be good for:
The reason I personally want to use this is because I'm implementing a HAMT (Hash Array Mapped Trie) in pure Elm, and using a record with 32 fields is getting tiresome :P