Skip to content

Added skipWhile function#551

Closed
Aatch wants to merge 1 commit intodlang:masterfrom
Aatch:std-algorithm-skipWhile
Closed

Added skipWhile function#551
Aatch wants to merge 1 commit intodlang:masterfrom
Aatch:std-algorithm-skipWhile

Conversation

@Aatch
Copy link
Contributor

@Aatch Aatch commented Apr 23, 2012

No description provided.

@jmdavis
Copy link
Member

jmdavis commented Apr 23, 2012

Isn't this basically the same as the overload of std.algorithm.until which doesn't take a delimiter?

Also, the name skipWhile implies that what's returned is what's after the stuff that's been "skipped," not the stuff that's been "skipped." Since it's returned, it isn't really skipped. So, even if this were to be added it would need a different name.

But from the looks of it, it's redundant, since we have until.

@9rnsr
Copy link
Contributor

9rnsr commented Apr 23, 2012

Wow, I did find std.algorithm.until, but I didn't noticed the overload which takes predicate.
There is no example, and only declaration is documented. It's difficult to find it.
http://dlang.org/phobos/std_algorithm#until

@Aatch
Copy link
Contributor Author

Aatch commented Apr 23, 2012

Completely missed that... As @9rnsr said, its not well documented. I'm happy to close the request.

@Aatch Aatch closed this Apr 23, 2012
@jmdavis
Copy link
Member

jmdavis commented Apr 23, 2012

Yes, until really should be better documented with regards to that overload (feel free to open a pull request on that if you want to), but it's there.

@Aatch
Copy link
Contributor Author

Aatch commented Apr 24, 2012

I will when I get around to it. Another point for it being documented is that the usage is not that obvious, took me a while how to use properly without invoking a ton of copies. I think some aspects of the return types of several functions in std.algorithm could be better explained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments