Functional operations for iterators and slices, similar to sequtils