[Issue 13473] std.algorithm.expand

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13473

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 13473] std.algorithm.expand

2018-03-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13473

Seb  changed:

   What|Removed |Added

 CC||greensunn...@gmail.com

--- Comment #3 from Seb  ---
> 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?

--


[Issue 13473] std.algorithm.expand

2014-09-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13473

hst...@quickfur.ath.cx changed:

   What|Removed |Added

 CC||hst...@quickfur.ath.cx

--- Comment #1 from hst...@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?

--


[Issue 13473] std.algorithm.expand

2014-09-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13473

--- Comment #2 from bearophile_h...@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.

--