powered by
Lens into a slice of a vector.
slice_l(idx)
A lens that selects the specified slice
Indices of the elements to lens into
This lens performs indexing using single bracket notation, i.e., x[idx].
x[idx]
x <- letters[1:10] l <- slice_l(1:5) view(x, l)
Run the code above in your browser using DataLab