Skip to content

Add "new MutableList from ZZ"#4097

Open
d-torrance wants to merge 2 commits intoMacaulay2:developmentfrom
d-torrance:mutable-list
Open

Add "new MutableList from ZZ"#4097
d-torrance wants to merge 2 commits intoMacaulay2:developmentfrom
d-torrance:mutable-list

Conversation

@d-torrance
Copy link
Member

We add a new constructor for MutableList suggested in an old bugs/dan file:

i1 : new MutableList from 6

o1 = MutableList{...6...}

o1 : MutableList

i2 : peek oo

o2 = MutableList{null, null, null, null, null, null}

We also improve the MutableList docs a bit, mentioning a couple things suggested in another old bugs/dan file.

@mahrud
Copy link
Member

mahrud commented Jan 17, 2026

I would prefer a different notation here. Maybe something involving allocate or size rather than squeezing into NewFromMethod, which is meant to be for subclasses only.

Constructs a mutable list of a given length (all elements are null).
Closes an old bug, so we remove the corresponding file.
Convert to SimpleDoc, document "new MutableList from ZZ", and address
a couple issues regarding their growth from an old bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants