MCPcopy Create free account
hub / github.com/expr-lang/expr / Swap

Method Swap

vm/runtime/sort.go:13–16  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

11}
12
13func (s *SortBy) Swap(i, j int) {
14 s.Array[i], s.Array[j] = s.Array[j], s.Array[i]
15 s.Values[i], s.Values[j] = s.Values[j], s.Values[i]
16}
17
18func (s *SortBy) Less(i, j int) bool {
19 a, b := s.Values[i], s.Values[j]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected