func Pop(a []T) (T, []T) {
	return a[len(a)-1], a[:len(a)-1]
}
Pop removes the last element from a, returning an updating slice
package slice
import (
	"reflect"
	"sort"
)
type T interface{}
func Any(s []T, fn func(T) bool) bool {
	return IndexFunc(s, fn) != -1
}
func All(s []T, fn func(T) bool) bool {
	return IndexFunc(s, func(e T) bool { return !fn(e) }) == -1
}
func IndexFunc(s []T, fn func(T) bool) int {
	for i, e := range s {
		if fn(e) {
			return i
		}
	}
	return -1
}
func Index(s []T, e T) int {
	return IndexFunc(s, func(el T) bool { return el == e })
}
var (
	zero    T
	needsGC = typeNeedsGC(reflect.TypeOf(zero))
)
func typeNeedsGC(t reflect.Type) bool {
	switch t.Kind() {
	case reflect.Map, reflect.Interface, reflect.Ptr, reflect.Chan, reflect.Slice:
		return true
	case reflect.Struct:
		n := t.NumField()
		for i := 0; i < n; i++ {
			if typeNeedsGC(t.Field(i).Type) {
				return true
			}
		}
		return false
	default:
		return false
	}
}
func Cut(a []T, i, j int) []T {
	if !needsGC {
		return append(a[:i], a[j:]...)
	}
	copy(a[i:], a[j:])
	for k, n := len(a)-j+i, len(a); k < n; k++ {
		a[k] = zero
	}
	return a[:len(a)-j+i]
}
func Delete(a []T, i int) []T {
	return Cut(a, i, i+1)
}
func DeleteUnordered(a []T, i int) []T {
	a[i] = a[len(a)-1]
	a[len(a)-1] = zero
	return a[:len(a)-1]
}
func Insert(a []T, v T, i int) []T {
	a = append(a, zero)
	copy(a[i+1:], a[i:])
	a[i] = v
	return a
}
func InsertSlice(a []T, v []T, i int) []T {
	return append(a[:i], append(v, a[i:]...)...)
}
func Push(a []T, v T) []T {
	return append(a, v)
}