This is with reference to documentation about use of array in D (https://dlang.org/spec/arrays.html#array-setting).

In languages tailor-made for data mining, like R, a subset of an array (not necessarily contiguous values) can be extracted as shown below:

vec //a vector or array in R
c(1:length(vec))[vec > 3] //extract a new array having values of vec that are greater than 3.

I have read about slicing, but it can only subset contiguous values. Correct me if I am wrong here.

How can the above functionality be achieved in D ?
(I am totally new to D)

Reply via email to