On Wednesday, 19 June 2019 at 06:00:28 UTC, Jonathan M Davis
wrote:
On Tuesday, June 18, 2019 10:27:46 PM MDT lili via
Do you known reason for why Dlang Range are consumed by
iterating over them. I this design is strange.
If you want an overview of ranges, you can watch this:
https://www.
On Tuesday, June 18, 2019 10:27:46 PM MDT lili via Digitalmars-d-learn
wrote:
> On Tuesday, 18 June 2019 at 17:25:51 UTC, Johannes Loher wrote:
> > The result of heapify is a BinaryHeap, which is a range. writeln
> > basically prints ranges by iterating over them and printing
> > each element
> >
On Tuesday, 18 June 2019 at 17:25:51 UTC, Johannes Loher wrote:
The result of heapify is a BinaryHeap, which is a range. writeln
basically prints ranges by iterating over them and printing
each element
(except for the types which are special cased, such as dynamic
arrays
etc.). However, ranges
On Tuesday, June 18, 2019 9:45:33 AM MDT lili via Digitalmars-d-learn wrote:
> Hi Guys:
> see this code
> ~~~
> int[] ar = [1,2,3,4,52,34,22];
> auto h = heapify(ar);
> assert(h.length() == ar.length);
> writeln("h:",h);
> assert(h.empty());
> ~~~
> dmd v2.086.0 run al
Am 18.06.19 um 17:45 schrieb lili:
> Hi Guys:
> see this code
> ~~~
> int[] ar = [1,2,3,4,52,34,22];
> auto h = heapify(ar);
> assert(h.length() == ar.length);
> writeln("h:",h);
> assert(h.empty());
> ~~~
> dmd v2.086.0 run all assert passed. Why?
The result of heapify is
Hi Guys:
see this code
~~~
int[] ar = [1,2,3,4,52,34,22];
auto h = heapify(ar);
assert(h.length() == ar.length);
writeln("h:",h);
assert(h.empty());
~~~
dmd v2.086.0 run all assert passed. Why?