func (partyIDs IDSlice) Remove(id ID) IDSlice {
	newPartyIDs := make(IDSlice, 0, len(partyIDs))
	for _, partyID := range partyIDs {
		if partyID != id {
			newPartyIDs = append(newPartyIDs, partyID)
		}
	}
	return newPartyIDs
}
Remove finds id in partyIDs and returns a copy of the slice if it was found.
package party
import (
	"encoding/binary"
	"io"
	"sort"
	"strings"
)
type IDSlice []ID
func NewIDSlice(partyIDs []ID) IDSlice {
	ids := IDSlice(partyIDs).Copy()
	ids.sort()
	return ids
}
func (partyIDs IDSlice) Contains(ids ...ID) bool {
	for _, id := range ids {
		if _, ok := partyIDs.search(id); !ok {
			return false
		}
	}
	return true
}
func (partyIDs IDSlice) Valid() bool {
	n := len(partyIDs)
	for i := 1; i < n; i++ {
		if partyIDs[i-1] >= partyIDs[i] {
			return false
		}
	}
	return true
}
func (partyIDs IDSlice) Copy() IDSlice {
	a := make(IDSlice, len(partyIDs))
	copy(a, partyIDs)
	return a
}