robrix/Traversal — pull request #20 by robrix (2014-11-22 16:24:41+00:00)
Title: [WIP] Sequence

The original intent was:

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

This ballooned somewhat when working on `concat`—some tests made it obvious that something was amiss, and in fact it turns out that `flattenMap` is traversing the nested reducibles out of order. (This has not yet been resolved.)

Debugging this turns out to be quite difficult.

Fixes #18.