Because reasons. (Thanks to Mike Ash for reminding me of the flatMap trick and for suggesting AnyIterator instead of AnySequence.)
Because reasons. (Thanks to Mike Ash for reminding me of the flatMap trick and for suggesting AnyIterator instead of AnySequence.)
2 Comments
I like it, but didn’t you think that `while` would be better expressed as a guard condition? Or was that only with `where`?
Comment preceding drop(while:) is same as for prefix(while:) above it “Returns a subsequence containing the initial elements until `predicate` / returns `false`, skipping all remaining elements”
Surely you meant something like “Returns a subsequence containing the remaining elements, after skipping initial elements until `predicate` returns `false`”