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

Filter operator #28

Closed
michaelko opened this issue Oct 22, 2012 · 1 comment
Closed

Filter operator #28

michaelko opened this issue Oct 22, 2012 · 1 comment

Comments

@michaelko
Copy link

I'm suggesting a new operator ~. It takes two Arrays x and y, and return a Array [z| z=xi for all yi=true].

Example:
<[1,2,3,4,5] ~ [1,null,1,null]
>[1,3]

Or maybe a set?

<[1,2,3,4,5] ~ [1,null,1,null]
>1
>3

<[[1,2,3,4,5] ~ [1,null,1,null]]
>[1,3]
@stedolan
Copy link
Contributor

I think this functionality is much too special-case to invent a new one-character operator for. I would like (and plan to implement) a zip function, so that you could zip together [1,2,3,4] and [1,null,1,null] to get [[1,1],[2,null],[3,1],[4,null]], which can be selected.

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