[snip]
On Friday, 29 April 2016 at 13:20:47 UTC, Michael Coulombe wrote:
Try this:
iota(1,11).each!(a => writeln("#".replicate(a)))
Yes, this is what I was looking for!
It's my birthday today.
On Fri, Apr 29, 2016 at 11:45:39AM -0700, H. S. Teoh via Digitalmars-d-learn
wrote:
[...]
> Unfortunately, due to some silly autodecoding issues in Phobos,
> byCodeUnit is a necessary hack to make this work. I'll file a bug for
> this.
[...]
https://issues.dlang.org/show_bug.cgi?id=15972
T
--
On Fri, Apr 29, 2016 at 12:01:19PM +, Joel via Digitalmars-d-learn wrote:
> On Friday, 29 April 2016 at 11:31:51 UTC, rikki cattermole wrote:
> >Not entirely the goal I'm guessing output wise, but this works.
> >
> >import std.range : repeat;
> >foreach(line; 1 .. 11) {
> >
On Friday, 29 April 2016 at 12:01:19 UTC, Joel wrote:
On Friday, 29 April 2016 at 11:31:51 UTC, rikki cattermole
wrote:
Not entirely the goal I'm guessing output wise, but this works.
import std.range : repeat;
foreach(line; 1 .. 11) {
writeln('#'.repeat(line));
}
That is shorter
On Friday, 29 April 2016 at 11:31:51 UTC, rikki cattermole wrote:
Not entirely the goal I'm guessing output wise, but this works.
import std.range : repeat;
foreach(line; 1 .. 11) {
writeln('#'.repeat(line));
}
That is shorter than my foreach version, but I want one that
doesn't use
On 29/04/2016 11:23 PM, Joel wrote:
What is a quick way to print a triangle? I'm thinking without foreach,
not like I have here.
foreach(line; iota(1, 10 + 1)) {
writeln("#".replicate(line));
}
These don't work:
iota(1, 10 + 1).
tee!((a) => { writeln("#".replicate(
What is a quick way to print a triangle? I'm thinking without
foreach, not like I have here.
foreach(line; iota(1, 10 + 1)) {
writeln("#".replicate(line));
}
These don't work:
iota(1, 10 + 1).
tee!((a) => { writeln("#".replicate(a)); });
string resul