mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 13:38:35 +00:00
9 lines
291 B
Go
9 lines
291 B
Go
|
package core
|
||
|
|
||
|
// slice attaches the methods of Interface to []int, sorting in increasing order.
|
||
|
type slice []uint32
|
||
|
|
||
|
func (p slice) Len() int { return len(p) }
|
||
|
func (p slice) Less(i, j int) bool { return p[i] < p[j] }
|
||
|
func (p slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|