robrix / Traversal

Enumeration & iteration of collections in Swift.
MIT License
58 stars 1 forks source link

Sequence #20

Closed robrix closed 9 years ago

robrix commented 9 years ago

The original intent was:

  1. Implement sequence<R: ReducibleType>(reducible: R) -> SequenceOf<R.Element> so that arbitrary reducibles can easily be iterated using for/in.
  2. Remove ReducibleOf’s conformance to SequenceType, resolving the ambiguity described in #18.

Then I got sidetracked trying to wrap ReducerOf in ReducibleOf and finding that this made concatenation reduce out of order. cf #26.

robrix commented 9 years ago

I’m not wrapping things in ReducibleOf<T> any more; that just makes iterators out of them, which is a bad idea.

I’m also not attempting to find a resolution to #26 on this PR any more; I have an idea why it’s happening now at least.