Re: Array remove duplicates question

[email protected] (Elizabeth Mattijsen)
Newsgroups perl.perl6.users
Message-ID <[email protected]>
$ raku -e 'my @a = 1,2,3,6,7,1,2,8; @a .= unique; say @a'
[1 2 3 6 7 8]

https://docs.raku.org/type/Any#method_unique

> On 6 May 2024, at 04:35, ToddAndMargo via perl6-users <[email protected]> wrote:
> 
> Hi All,
> 
> I have thought of how to do it and pretty sure
> it would work, but just in case Raku have one
> of those sweet utilities, does Raku have a
> utility that will take an array and remove all
> the duplicates and rearrange the cells back
> in order?
> 
> Many thanks,
> -T
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.