Re: [go-nuts] removing one slice elements from another

2025-02-12 Thread Jabari Zakiya
Thanks! That did it. On Wednesday, February 12, 2025 at 2:32:27 PM UTC-5 Def Ceb wrote: > The function passed to DeleteFunc should accept a single element and > return a boolean indicating whether it should be removed. > You could do this: > > lhr = slices.DeleteFunc(lhr, func(n uint) bool { re

Re: [go-nuts] removing one slice elements from another

2025-02-12 Thread Def Ceb
The function passed to DeleteFunc should accept a single element and return a boolean indicating whether it should be removed. You could do this: lhr = slices.DeleteFunc(lhr, func(n uint) bool { return slices.Contains(lhr_del, n) }) Jabari Zakiya: I have two slice, lhr and lhr_dels. I want t