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

Add get slice operator function #696

Open
evhub opened this issue Dec 7, 2022 · 1 comment
Open

Add get slice operator function #696

evhub opened this issue Dec 7, 2022 · 1 comment
Labels

Comments

@evhub
Copy link
Owner

evhub commented Dec 7, 2022

Should be equivalent to:

.[:] = (arr, start, stop) -> arr[start:stop]
@evhub evhub added the feature label Dec 7, 2022
@evhub evhub modified the milestone: v2.1.2 Dec 7, 2022
@evhub
Copy link
Owner Author

evhub commented Dec 7, 2022

Unfortunately this syntax doesn't work because .[:] is already valid as shorthand for

.[:] = arr -> arr[:]

so if we want this it'll have to have a different spelling (maybe a built-in?).

@evhub evhub changed the title Add .[:] operator function Add get slice operator function Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant