This PR provides the `take` iterator combinator that transforms any iterator into an iterator that stops after a given number of steps. The change contains the implementation and lemmas. `take` has a special implementation of `IteratorLoop` that relies on a potentially more efficient `forIn` implementation of the inner iterator. The mysterious `@[specialize]` on a test has been removed because it is not necessary anymore according to a manual inspection of the IR. Either I erroneously concluded from experiments that it was necessary of something has changed in the meantime that makes it unnecessary. |
||
|---|---|---|
| .. | ||
| bench | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lean-toolchain | ||