New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Immutable "flat" arrays #620

Closed
Skinney opened this Issue May 22, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@Skinney
Contributor

Skinney commented May 22, 2016

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:

  • Custom datastructures
  • Read-heavy usecases

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

@Skinney Skinney closed this Jul 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment