Swift edition
Iterators
Operators that change a chain over a collection: how it matches, and what it leaves in. Where the Java edition has streams, Swift has these.
| Operator | Changes | Set |
|---|---|---|
stream/swap-match | contains(where:) and allSatisfy | defaults |
stream/remove-stage | a stage of a chain left out | defaults |
The mutants each makes, on samples/operators/Sources/Operators/Iterators.swift:
mutastic mutants samples/operators --at=Sources/Operators/Iterators.swift:1-99 --operators=stream/swap-match,stream/remove-stagem3055c30a Sources/Operators/Iterators.swift:3:8 stream/swap-match contains(where: becomes allSatisfy( in anyOverduem1beed0ff Sources/Operators/Iterators.swift:8:11 stream/remove-stage .filter { $0 > 0 } is left out in paidTotalno estimate: no run is recorded here yet; run once to get estimates, or add --estimate2 mutantsSwap match
Section titled “Swap match”stream/swap-match, in the defaults. Each becomes the other: any element matching for every element matching.
Remove stage
Section titled “Remove stage”stream/remove-stage, in the defaults. A filter, sorted, reversed, dropFirst, dropLast, prefix or suffix is left out of a chain. sorted and reversed aren’t left out before an end that doesn’t notice order, such as count or contains.
- Every operator, in one table.