On Friday, 6 December 2019 at 05:09:58 UTC, Paul Backus wrote:
On Thursday, 5 December 2019 at 17:27:45 UTC, Taylor Hillegeist
wrote:
I agree with this.
I wasn't clear enough in my question though.
I was trying to distinguish between std.functional.compose and
std.functional.pipe
they look ve
On Thursday, 5 December 2019 at 17:27:45 UTC, Taylor Hillegeist
wrote:
I agree with this.
I wasn't clear enough in my question though.
I was trying to distinguish between std.functional.compose and
std.functional.pipe
they look very the same. Pipe says it reverses functions order.
Which makes
On Thursday, 5 December 2019 at 15:43:30 UTC, Paul Backus wrote:
On Thursday, 5 December 2019 at 15:30:52 UTC, Taylor Hillegeist
wrote:
On Friday, 29 November 2019 at 15:24:31 UTC, Paul Backus wrote:
.pipe!((output) {
if (sortOutput)
return output.sort!("a < b");
else
On Thursday, 5 December 2019 at 15:30:52 UTC, Taylor Hillegeist
wrote:
On Friday, 29 November 2019 at 15:24:31 UTC, Paul Backus wrote:
.pipe!((output) {
if (sortOutput)
return output.sort!("a < b");
else
return output;
})
.writeln(); // maybe you meant eac
On Friday, 29 November 2019 at 15:24:31 UTC, Paul Backus wrote:
.pipe!((output) {
if (sortOutput)
return output.sort!("a < b");
else
return output;
})
.writeln(); // maybe you meant each!writeln ?
Why pipe as apposed to compose?
Pipes functions in sequen
On Friday, 29 November 2019 at 15:24:31 UTC, Paul Backus wrote:
On Friday, 29 November 2019 at 15:17:35 UTC, Taylor R
Hillegeist wrote:
I know phobos has choose which is close.
But what I want is something like:
bool sortOutput;
if(sortOutput){
read(Textfile)
.splitter("\n")
.filter(a=>a
On Friday, 29 November 2019 at 15:17:35 UTC, Taylor R Hillegeist
wrote:
I know phobos has choose which is close.
But what I want is something like:
bool sortOutput;
if(sortOutput){
read(Textfile)
.splitter("\n")
.filter(a=>a.contains("data))
.doif(sortOutput,sort!("a < b"))
.writeln
When using the standard library. and making command-line
applications I find myself wanting optional processes in line.
for me, this typically makes the following structure.
bool sortOutput;
if(sortOutput){
read(Textfile)
.splitter("\n")
.filter(a=>a.contains("data))
.sort!("a < b").w