powered by
Illegal lens into elements of a vector that satisfy a predicate.
where_il(p)
A lens that selects the elements that satisfy the predicate
A predicate function
d <- 1:10 l <- where_il(\(x) x %% 2 == 0) view(d, l) over(d, l, \(x) x / 2)
Run the code above in your browser using DataLab