Thread overview | |||||
---|---|---|---|---|---|
|
June 30, 2004 Array property 'unique' | ||||
---|---|---|---|---|
| ||||
I think this would be useful, would return the unique elements in the array . Thoughts ? Charlie - uber clarification char [] a; a ~= "a"; a ~= "b"; a ~= "c"; a ~= "c"; char [] b = a.unique; yields ("a","b","c") |
June 30, 2004 Re: Array property 'unique' | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charlie | On Wed, 30 Jun 2004 00:41:02 +0000 (UTC), Charlie <Charlie_member@pathlink.com> wrote: > I think this would be useful, would return the unique elements in the array . > > Thoughts ? You can probably do this with a template, the DTL will almost certainly have a template for doing it. Matthew's DTL (the only one in production that I know of) might already, we should ask him.. Matthew? > Charlie > > > - > uber clarification > > char [] a; > a ~= "a"; > a ~= "b"; > a ~= "c"; > a ~= "c"; > > char [] b = a.unique; yields ("a","b","c") > > -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ |
June 30, 2004 Re: Array property 'unique' | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | Regan Heath wrote: > On Wed, 30 Jun 2004 00:41:02 +0000 (UTC), Charlie <Charlie_member@pathlink.com> wrote: > >> I think this would be useful, would return the unique elements in the array . >> >> Thoughts ? > > > You can probably do this with a template, the DTL will almost certainly have a template for doing it. Matthew's DTL (the only one in production that I know of) might already, we should ask him.. Matthew? He can't hear you... "I love deadlines. I especially like the whooshing sound they make as they go flying by." -- Douglas Adams Sam > >> Charlie >> >> >> - >> uber clarification >> >> char [] a; >> a ~= "a"; >> a ~= "b"; >> a ~= "c"; >> a ~= "c"; >> >> char [] b = a.unique; yields ("a","b","c") >> >> > > > |
Copyright © 1999-2021 by the D Language Foundation