Re: Lazy std.algorithm.replace()

2015-11-07 Thread Nordlöw via Digitalmars-d-learn
On Monday, 2 November 2015 at 20:22:11 UTC, Nordlöw wrote: I'm done with the easy cases at https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L1946 and https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L1997 Moved stuff to https://github.com/nordlow/justd/blob/master/repl

Re: Lazy std.algorithm.replace()

2015-11-02 Thread Nordlöw via Digitalmars-d-learn
On Monday, 2 November 2015 at 20:25:44 UTC, Adam D. Ruppe wrote: On Sunday, 1 November 2015 at 14:26:21 UTC, Nordlöw wrote: Is there a reason why Phobos doesn't contain a lazy range variant of std.string.replace? Would something like map work with the predicate being if(matches_needle) return

Re: Lazy std.algorithm.replace()

2015-11-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 1 November 2015 at 14:26:21 UTC, Nordlöw wrote: Is there a reason why Phobos doesn't contain a lazy range variant of std.string.replace? Would something like map work with the predicate being if(matches_needle) return replacement; else return original; ?

Re: Lazy std.algorithm.replace()

2015-11-02 Thread Nordlöw via Digitalmars-d-learn
On Monday, 2 November 2015 at 19:53:09 UTC, Ali Çehreli wrote: On 11/02/2015 04:22 AM, Nordlöw wrote: On Sunday, 1 November 2015 at 14:26:21 UTC, Nordlöw wrote: Is there a reason why Phobos doesn't contain a lazy range variant of std.string.replace? Ping. What is the use case? Chaining r

Re: Lazy std.algorithm.replace()

2015-11-02 Thread Ali Çehreli via Digitalmars-d-learn
On 11/02/2015 04:22 AM, Nordlöw wrote: On Sunday, 1 November 2015 at 14:26:21 UTC, Nordlöw wrote: Is there a reason why Phobos doesn't contain a lazy range variant of std.string.replace? Ping. What is the use case? The implementation doesn't seem trivial to me as it needs to maintain an in

Re: Lazy std.algorithm.replace()

2015-11-02 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 1 November 2015 at 14:26:21 UTC, Nordlöw wrote: Is there a reason why Phobos doesn't contain a lazy range variant of std.string.replace? Ping.

Lazy std.algorithm.replace()

2015-11-01 Thread Nordlöw via Digitalmars-d-learn
Is there a reason why Phobos doesn't contain a lazy range variant of std.string.replace?