Right now lists and maps have their own version of map, filter, reduce, etc.
We could imagine a common iterator interface supported by fibers that both could implement.
This way any user defined object could also implement that interface.
var filtered = [1, 2, 3]
.iter()
.filter(
fun (int i, int element) -> element % 2 == 0
);
Right now lists and maps have their own version of map, filter, reduce, etc.
We could imagine a common iterator interface supported by fibers that both could implement. This way any user defined object could also implement that interface.