func Contains(s T, val interface{}) bool {
	return Index(s, val) >= 0
}
Contains reports whether val is within s. val's type must be s's
element type.
package slice
import (
	"reflect"
	"github.com/aclements/go-gg/generic"
)
func Index(s T, val interface{}) int {
	rs := reflectSlice(s)
	if vt := reflect.TypeOf(val); rs.Type().Elem() != vt {
		panic(&generic.TypeError{rs.Type(), vt, "cannot find"})
	}
	for i, l := 0, rs.Len(); i < l; i++ {
		if rs.Index(i).Interface() == val {
			return i
		}
	}
	return -1
}
func LastIndex(s T, val interface{}) int {
	rs := reflectSlice(s)
	if vt := reflect.TypeOf(val); rs.Type().Elem() != vt {
		panic(&generic.TypeError{rs.Type(), vt, "cannot find"})
	}
	for i := rs.Len() - 1; i >= 0; i-- {
		if rs.Index(i).Interface() == val {
			return i
		}
	}
	return -1
}