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

ElementFunc, ReverseListFun and SliceFunc mark handling #101

Merged
merged 3 commits into from Apr 30, 2021

Conversation

mildwonkey
Copy link
Contributor

ElementFunc, ReverseListFun and SliceFunc have been updated to handle marks, with tests!

ElementFunc is updated to handle marks. If the requested element is marked, the return value will have the same mark. Likewise if the entire input list is marked, those marks will propegate to the return value.
Add precise mark handling to ReverseList func, plus some basic tests.
SliceFunc will now preserve marks on the input list as a whole, and any individual elements.
Copy link
Collaborator

@apparentlymart apparentlymart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good to me and I'm going to merge it imminently.

Comment on lines -192 to +194
l := args[0].LengthInt()
l := input.LengthInt()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's funny that in this particular function we end up needing to unmark only because of this LengthInt call, because otherwise everything we do with args[0] is an operation method that will handle marks automatically! Having the length is important for this function though (to implement the wrapping behavior), so this does seem reasonable.

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.

None yet

2 participants