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

feat(stdlib): Add fromArray to Queue module #1932

Merged
merged 4 commits into from
Dec 31, 2023

Conversation

spotandjake
Copy link
Member

Adds fromArray to the Queue module, helping to bring it more inline with the other stdlib data structures.

@ospencer
Copy link
Member

This is simple and makes sense, though I'm curious from @alex-snezhko if it makes sense to allocate a larger underlying array since the moment you add a new element, it'll have to resize itself.

@alex-snezhko
Copy link
Member

That sounds like a good idea, maybe make the size double the array length

@spotandjake
Copy link
Member Author

Done

stdlib/queue.gr Outdated Show resolved Hide resolved
stdlib/queue.gr Outdated Show resolved Hide resolved
@spotandjake
Copy link
Member Author

Applied those suggestions

stdlib/queue.gr Outdated Show resolved Hide resolved
@phated
Copy link
Member

phated commented Dec 31, 2023

@spotandjake please resolve the conflicts 🙏

@spotandjake spotandjake force-pushed the spotandjake-queue-fromArray branch from 5436bee to a1369a7 Compare December 31, 2023 22:08
@spotandjake
Copy link
Member Author

@spotandjake please resolve the conflicts 🙏

Done

@phated phated enabled auto-merge December 31, 2023 22:46
@phated phated changed the title feat(stdlib): add fromArray to Queue feat(stdlib): add fromArray to Queue module Dec 31, 2023
@phated phated changed the title feat(stdlib): add fromArray to Queue module feat(stdlib): Add fromArray to Queue module Dec 31, 2023
@phated phated added this pull request to the merge queue Dec 31, 2023
Merged via the queue into grain-lang:main with commit 1c35a94 Dec 31, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants