On Monday, 18 April 2016 at 20:24:40 UTC, Jesse Phillips wrote:
On Sunday, 17 April 2016 at 15:23:50 UTC, w0rp wrote:
void main() {
// Print all directories from this one up to and including
/.
getcwd()
.unaryRecurrence!dirName
.until("/", OpenRight.no)
.each!writeln;
}
F
On Monday, 18 April 2016 at 12:02:24 UTC, thedeemon wrote:
On Sunday, 17 April 2016 at 15:23:50 UTC, w0rp wrote:
auto unaryRecurrence(alias func, T)(T initialValue) {
return recurrence!((values, index) =>
func(values[0]))(initialValue);
}
This is kind of neat. My question is, should som
On Sunday, 17 April 2016 at 15:23:50 UTC, w0rp wrote:
void main() {
// Print all directories from this one up to and including
/.
getcwd()
.unaryRecurrence!dirName
.until("/", OpenRight.no)
.each!writeln;
}
FYI, OS independent version:
void main() {
// Print all direc
On Sunday, 17 April 2016 at 15:23:50 UTC, w0rp wrote:
auto unaryRecurrence(alias func, T)(T initialValue) {
return recurrence!((values, index) =>
func(values[0]))(initialValue);
}
This is kind of neat. My question is, should something like
this function be included in std.range? Either
I recently found myself wanting an algorithm to apply f(x)
repeatedly, generating an infinite sequence, for a variety of
reasons. One of those reasons is to generate ancestor
directories. Typically when I desire such a thing, I find myself
trying to find the existing algorithm which does this a