Re: how to sort the container Array from std.container

2018-06-08 Thread ag0aep6g via Digitalmars-d-learn
On 06/08/2018 10:52 AM, Flaze07 wrote: ah...well thank you, well...I did finds another way, but it is probably better to use linearRemove I used arr = make!( Array!uint )( remove( arr[], 2 ); so linearRemove is probably better Instead of creating a new array, you could update the length of

Re: how to sort the container Array from std.container

2018-06-08 Thread Flaze07 via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 14:46:56 UTC, ag0aep6g wrote: On 06/06/2018 04:20 PM, Flaze07 wrote: hmm, and sorry for asking more, what about removing an element from it ? I found no remove operation that can remove from the middle ( removeAny and removeBack both removes the latest element,

Re: how to sort the container Array from std.container

2018-06-06 Thread ag0aep6g via Digitalmars-d-learn
On 06/06/2018 04:20 PM, Flaze07 wrote: hmm, and sorry for asking more, what about removing an element from it ? I found no remove operation that can remove from the middle ( removeAny and removeBack both removes the latest element, linearRemove receive Array!uint...which  don't know how to

Re: how to sort the container Array from std.container

2018-06-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/6/18 10:20 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:06:54 UTC, rikki cattermole wrote: On 07/06/2018 1:58 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 13:46:41 UTC, Adam D. Ruppe wrote: On Wednesday, 6 June 2018 at 13:44:09 UTC, Flaze07 wrote: sort( arr.Range ); don't work,

Re: how to sort the container Array from std.container

2018-06-06 Thread Flaze07 via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 14:29:28 UTC, rikki cattermole wrote: On 07/06/2018 2:27 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:24:15 UTC, rikki cattermole wrote: On 07/06/2018 2:20 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:06:54 UTC, rikki cattermole wrote: [...] hmm,

Re: how to sort the container Array from std.container

2018-06-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/06/2018 2:27 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:24:15 UTC, rikki cattermole wrote: On 07/06/2018 2:20 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:06:54 UTC, rikki cattermole wrote: On 07/06/2018 1:58 AM, Flaze07 wrote: [...] Yes. hmm, and sorry for asking

Re: how to sort the container Array from std.container

2018-06-06 Thread Flaze07 via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 14:24:15 UTC, rikki cattermole wrote: On 07/06/2018 2:20 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:06:54 UTC, rikki cattermole wrote: On 07/06/2018 1:58 AM, Flaze07 wrote: [...] Yes. hmm, and sorry for asking more, what about removing an element from

Re: how to sort the container Array from std.container

2018-06-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/06/2018 2:20 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 14:06:54 UTC, rikki cattermole wrote: On 07/06/2018 1:58 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 13:46:41 UTC, Adam D. Ruppe wrote: On Wednesday, 6 June 2018 at 13:44:09 UTC, Flaze07 wrote: sort( arr.Range ); don't

Re: how to sort the container Array from std.container

2018-06-06 Thread Flaze07 via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 14:06:54 UTC, rikki cattermole wrote: On 07/06/2018 1:58 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 13:46:41 UTC, Adam D. Ruppe wrote: On Wednesday, 6 June 2018 at 13:44:09 UTC, Flaze07 wrote: sort( arr.Range ); don't work, it says cannot pass

Re: how to sort the container Array from std.container

2018-06-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/06/2018 1:58 AM, Flaze07 wrote: On Wednesday, 6 June 2018 at 13:46:41 UTC, Adam D. Ruppe wrote: On Wednesday, 6 June 2018 at 13:44:09 UTC, Flaze07 wrote: sort( arr.Range ); don't work, it says cannot pass RangeT!(Array!uint) as function argument Range is the type, you want the value I

Re: how to sort the container Array from std.container

2018-06-06 Thread Flaze07 via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 13:46:41 UTC, Adam D. Ruppe wrote: On Wednesday, 6 June 2018 at 13:44:09 UTC, Flaze07 wrote: sort( arr.Range ); don't work, it says cannot pass RangeT!(Array!uint) as function argument Range is the type, you want the value I think you can do sort(arr[]) maybe

Re: how to sort the container Array from std.container

2018-06-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 13:44:09 UTC, Flaze07 wrote: sort( arr.Range ); don't work, it says cannot pass RangeT!(Array!uint) as function argument Range is the type, you want the value I think you can do sort(arr[]) maybe