func (l *list) LPush(vals ...string) int64 {
	for i, j := 0, len(vals)-1; i < j; i, j = i+1, j-1 {
		vals[i], vals[j] = vals[j], vals[i]
	}
	*l = append(vals, *l...)
	return int64(len(*l))
}
LPush pushes the provided values on the head of the list. It returns the new
length of the list.
package types
type List interface {
	Value
	LIndex(int64) (string, bool)
	LInsertBefore(string, string) int64
	LInsertAfter(string, string) int64
	LLen() int64
	LPop() (string, bool)
	LPush(...string) int64
	LRange(int64, int64) []string
	LRem(int64, string) int64
	LSet(int64, string) bool
	LTrim(int64, int64)
	RPop() (string, bool)
	RPush(...string) int64
}
const initListCap int = 10
var _ List = (*list)(nil)
type list []string
func NewList() List {
	l := make(list, 0, initListCap)
	return &l
}
func (l list) Type() string {
	return "list"
}
func (l *list) LIndex(ix int64) (string, bool) {
	ln := int64(len(*l))
	if ix < 0 {
		ix += ln
	}
	if ix >= 0 && ix < ln {
		return (*l)[ix], true
	}
	return "", false
}
func (l *list) LInsertBefore(pivot, val string) int64 {
	for i := 0; i < len(*l); i++ {
		if (*l)[i] == pivot {
			*l = append(*l, "")
			copy((*l)[i+1:], (*l)[i:])
			(*l)[i] = val
			return int64(len(*l))
		}
	}
	return -1
}
func (l *list) LInsertAfter(pivot, val string) int64 {
	for i := 0; i < len(*l); i++ {
		if (*l)[i] == pivot {
			*l = append(*l, "")
			copy((*l)[i+2:], (*l)[i+1:])
			(*l)[i+1] = val
			return int64(len(*l))
		}
	}
	return -1
}
func (l *list) LLen() int64 {
	return int64(len(*l))
}
func (l *list) LPop() (string, bool) {
	if len(*l) == 0 {
		return "", false
	}
	val := (*l)[0]
	(*l)[0] = ""
	*l = (*l)[1:]
	return val, true
}