[Issue 13473] std.algorithm.expand
https://issues.dlang.org/show_bug.cgi?id=13473 Iain Buclaw changed: What|Removed |Added Priority|P1 |P4 --
[Issue 13473] std.algorithm.expand
https://issues.dlang.org/show_bug.cgi?id=13473 Sebchanged: 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
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
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. --