Skip to content
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

Any plans for a list/vector? #3

Open
jrbrodie77 opened this issue May 24, 2018 · 5 comments
Open

Any plans for a list/vector? #3

jrbrodie77 opened this issue May 24, 2018 · 5 comments
Labels

Comments

@jrbrodie77
Copy link

@jrbrodie77 jrbrodie77 commented May 24, 2018

I like the trend of increasing functional programming data types for Python. Any plans for a list/vector?

@1st1
Copy link
Member

@1st1 1st1 commented May 24, 2018

Not in the foreseeable future, unfortunately. PRs are welcome, though :)

@1st1 1st1 added the enhancement label May 24, 2018
@antonagestam
Copy link
Contributor

@antonagestam antonagestam commented Oct 4, 2019

How would an immutable list type differ from Python's tuple?

@1st1
Copy link
Member

@1st1 1st1 commented Oct 4, 2019

The immutable list type will be quite similar to Python's tuple type. But, tuple + tuple is an O(n) operation, while extending an immutable list (or concatenating two immutable lists) will be a (O log32 N) operation.

@amirouche
Copy link

@amirouche amirouche commented Jul 4, 2020

Not in the foreseeable future, unfortunately. PRs are welcome, though :)

I would like to work on this. I think about an implementation using fingertrees. Any advice?

@1st1
Copy link
Member

@1st1 1st1 commented Jul 6, 2020

I would like to work on this.

Great!

I think about an implementation using fingertrees. Any advice?

Is that what say Clojure uses? The current HAMT implementation was hugely inspired by Clojure's map implementation, so it would be great to study how they handle vectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.