func (slice fractlist) Less(i, j int) bool {
	return slice[i].fp > slice[j].fp
}
Note > to skip the reverse
package gwutil
import (
	"errors"
	"fmt"
	"math"
	"os"
	"runtime/pprof"
	"sort"
	log "github.com/sirupsen/logrus"
)
func Min(i int, js ...int) int {
	res := i
	for _, j := range js {
		if j < res {
			res = j
		}
	}
	return res
}
func Max(i int, js ...int) int {
	res := i
	for _, j := range js {
		if j > res {
			res = j
		}
	}
	return res
}
func LimitTo(a, v, b int) int {
	if v < a {
		return a
	}
	if v > b {
		return b
	}
	return v
}
func StringOfLength(r rune, n int) string {
	res := make([]rune, n)
	for i := 0; i < n; i++ {
		res[i] = r
	}
	return string(res)
}
func Map(vs []string, f func(string) string) []string {
	vsm := make([]string, len(vs))
	for i, v := range vs {
		vsm[i] = f(v)
	}
	return vsm
}
func IPow(a, b int) int {
	var result int = 1
	for 0 != b {
		if 0 != (b & 1) {
			result *= a
		}
		b >>= 1
		a *= a
	}
	return result
}
func Sum(input ...int) int {
	sum := 0
	for i := range input {
		sum += input[i]
	}
	return sum
}
type fract struct {
	fp  float64
	idx int
}
type fractlist []fract
func (slice fractlist) Len() int {
	return len(slice)
}