I couldn't find that in the documentation, is there a built in simple way to subset an array using a boolean array for filtering? In lodash or es6
I used to use this feature in R a lot and it seemed to be quite useful. Lately I faced several use cases when I could use something like that but couldn't find out if it is supported out of the box.
something like
subset([1, 2, 3, 4, 5], [true, false, false, false, true]) // => [1, 5]