Filter out consecutive elements based on comparison between adiacent two

Alex sascha.orlov at gmail.com
Thu Jan 31 13:22:37 UTC 2019


On Thursday, 31 January 2019 at 13:18:39 UTC, Langer wrote:
> Hi all,
>
> Ditto... something like:
>
> filter!((a,b) => a.foo != b.foo)
>
> Thank you!

I would say:

´´´
arr.group.map!(el => el[0])
´´´


More information about the Digitalmars-d-learn mailing list