Thread overview
[Issue 13473] std.algorithm.expand
Mar 31, 2018
Seb
Dec 17, 2022
Iain Buclaw
September 18, 2014
https://issues.dlang.org/show_bug.cgi?id=13473

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx

--- Comment #1 from hsteoh@quickfur.ath.cx ---
Aren't all cases of "expand" reducible to "recurrence"? Do you have an example where this isn't possible / is too ugly?

--
September 18, 2014
https://issues.dlang.org/show_bug.cgi?id=13473

--- Comment #2 from bearophile_hugs@eml.cc ---
(In reply to hsteoh from comment #1)
> Aren't all cases of "expand" reducible to "recurrence"? Do you have an example where this isn't possible / is too ugly?

I think the functionality of recurrence is a superset of the functionality of this function expand. But expand looks more fundamental and cleaner.

--
March 31, 2018
https://issues.dlang.org/show_bug.cgi?id=13473

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #3 from Seb <greensunny12@gmail.com> ---
> Aren't all cases of "expand" reducible to "recurrence"? Do you have an example where this isn't possible / is too ugly?

The closest pedant that D has to unfoldr (apart from recurrence) is its
Generator:

---
import std.experimental.all;
void main()
{
    new Generator!int({
        foreach (i; 0 .. 10)
            yield(i);
    }).writeln;
}
---

https://run.dlang.io/is/DQgDN3

So I'm not sure if there's anything actionable to be taken from this issue?

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=13473

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 01
https://issues.dlang.org/show_bug.cgi?id=13473

--- Comment #4 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/9641

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--