Levi Morrison

Results 116 comments of Levi Morrison

I can't do `Queue::peek` and `Stack::peek` because then you can't implement `Queue` and `Stack` in the same structure (like a `Deque`).

The basic idea of having `filter` and `map` algorithms that will delegate to an interface if the object implements and otherwise performing a general version is one I would like...

Do not put it on Collection. The idea for the semantics for these interfaces is that you are implementing it differently than the pure iterator version. Maybe you can use...

For now just `map` and `filter` is enough.

Note that `slice($start, $count)` could be be implemented as: ``` php function slice($start, $count) { return $this->skip($start)->limit($count); } ``` Maybe that will help make semantic sense of everything, I'm not...

Whenever I have realizations like this I always want to implement it immediately. Implementing it as above could eliminate a class. It's a bit off topic for this issue, but...

I've decided that algorithms should preserve keys by default. Once keys are stripped one cannot magically get them back, but generally one easily re-assign the keys if desired. This ticket...

I am thinking that this repository will narrow its scope to remove methods like `map`, `filter`, etc on classes. This in turn obviates the need for these iterators. Will keep...

PHP 7 is likely adding a `TypeException` class. I'll wait to see how that all pans out.

As an update PHP 7 will have `TypeError` which does not descend from `\Exception` but is a sibling class instead. I will need to re-evaluate what I do in this...