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

Array slicing #2

Closed
stroan opened this issue Sep 19, 2012 · 2 comments
Closed

Array slicing #2

stroan opened this issue Sep 19, 2012 · 2 comments

Comments

@stroan
Copy link
Contributor

stroan commented Sep 19, 2012

It'd be great to be able to slice arrays. Given the program

.[2..4]

and the input

[42,43,44,45,46,47]

result in the output

44
45
46
@stroan stroan closed this as completed Sep 19, 2012
@stroan stroan reopened this Sep 19, 2012
@stedolan
Copy link
Contributor

Hrm, should the output be the set of elements or the slice of the array?

For your example, should the output be:

44
45
46

or

[44, 45, 46]

@stroan
Copy link
Contributor Author

stroan commented Sep 19, 2012

I think that .[2..4] should result in the former and [.[2..4]] should produce the latter.

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

No branches or pull requests

3 participants