digitalmars.D - Array property 'unique'
- Charlie <Charlie_member pathlink.com> Jun 29 2004
- Regan Heath <regan netwin.co.nz> Jun 29 2004
- Sam McCall <tunah.d tunah.net> Jun 29 2004
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")
Jun 29 2004
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/
Jun 29 2004
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?
"I love deadlines. I especially like the whooshing sound they make as they go flying by." -- Douglas Adams SamCharlie - uber clarification char [] a; a ~= "a"; a ~= "b"; a ~= "c"; a ~= "c"; char [] b = a.unique; yields ("a","b","c")
Jun 29 2004








Sam McCall <tunah.d tunah.net>