// ToSlice returns the elements of the current set as a slice
500327
func (set WordSet) ToSlice() []string {
	var s []string
	for v := range set {
		s = append(s, v)
	}
	return s
}
230901
func (i IdentifierSet) ToOrderedSlice() []Identifier {
	var s []Identifier
	for v := range i {
		s = append(s, v)
	}
	sort.Sort(identifierSorter(s))
	return s
}
586420
func goSliceRawSlice(s string) []string {
	s = strings.TrimPrefix(s, "[")
	s = strings.TrimSuffix(s, "]")
	s = strings.TrimSpace(s)
	if s == "" {
		return nil
	}
	a := strings.Split(s, " ")
	return a
}
383514
func addressableSlice(slice interface{}) reflect.Value {
	v := reflect.ValueOf(slice)
	p := reflect.New(v.Type())
	p.Elem().Set(v)
	return p.Elem()
}
876410
func toSlice(from []interface{}, ptr interface{}) {
	// Value of the pointer to the target
	obj := reflect.Indirect(reflect.ValueOf(ptr))
	// We can't just convert from interface{} to whatever the target is (diff memory layout),
	// so we need to create a New slice of the proper type and copy the values individually
	t := reflect.TypeOf(ptr).Elem()
	tt := t.Elem()
	slice := reflect.MakeSlice(t, len(from), len(from))
	// Copying the data, val is an addressable Pointer of the actual target type
	val := reflect.Indirect(reflect.New(tt))
	for i := 0; i < len(from); i++ {
		v := reflect.ValueOf(from[i])
		if v.IsValid() && v.Type().ConvertibleTo(tt) {
			val.Set(v.Convert(tt))
		} else {
			val.Set(reflect.Zero(tt))
		}
		slice.Index(i).Set(val)
	}
	// Ok now assign our slice to the target pointer
	obj.Set(slice)
}
35975
func (s Uint64Slice) Set(v uint64) {
	for i := range s {
		s[i] = v
	}
}
913643
func (s Int8Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
500212
func (a ArrayVal) ToSlice() []interface{} {
	arr := make([]interface{}, len(a))
	for i, elem := range a {
		switch actual := elem.(type) {
		case ArrayVal:
			arr[i] = actual.ToSlice()
		case HashVal:
			arr[i] = actual.ToMap()
		default:
			arr[i] = actual
		}
	}
	return arr
}
1374282
func (set LiteralFieldSet) ToSlice() []LiteralField {
	var s []LiteralField
	for v := range set {
		s = append(s, v)
	}
	return s
}
316164
func (l *Language) GetStringSlice(key string) []string {
	return cast.ToStringSlice(l.Get(key))
}
1190076
func Uint64Slice(src []uint64) []*uint64 {
	dst := make([]*uint64, len(src))
	for i := 0; i < len(src); i++ {
		dst[i] = &(src[i])
	}
	return dst
}
949856
func (w *Writer) WriteStringSlice(slice []string) {
	setWriterRef(w, nil, nil)
	count := len(slice)
	if count == 0 {
		writeEmptyList(w)
		return
	}
	writeListHeader(w, count)
	stringSliceEncoder(w, slice)
	writeListFooter(w)
}
606683
func ToInt32Slice(i interface{}, d ...[]int32) (r []int32) {
	v, err := TryToInt32Slice(i)
	if err != nil && len(d) > 0 {
		return d[0]
	}
	return v
}
356525
func MakeVertexSlice(shader *Shader, len, cap int) *VertexSlice {
	if len > cap {
		panic("failed to make vertex slice: len > cap")
	}
	return &VertexSlice{
		va: newVertexArray(shader, cap),
		i:  0,
		j:  len,
	}
}
623358
func ReverseSlice(slice interface{}) interface{} {
	switch reflect.TypeOf(slice).Kind() {
	case reflect.Slice, reflect.Ptr:
		values := reflect.Indirect(reflect.ValueOf(slice))
		if values.Len() == 0 {
			return slice
		}

		reversedSlice := reflect.MakeSlice(reflect.SliceOf(reflect.Indirect(values.Index(0)).Type()), values.Len(), values.Len())

		k := 0
		for i := values.Len() - 1; i >= 0; i-- {
			reversedSlice.Index(k).Set(copyElement(values.Index(i)))
			k++
		}

		return reversedSlice.Interface()
	default:
		panic(fmt.Sprintf("Type not allowed: %v", reflect.TypeOf(slice).Kind()))
	}
}
902102
func Int32Slice(src []int32) []*int32 {
	dst := make([]*int32, len(src))
	for i := 0; i < len(src); i++ {
		dst[i] = &(src[i])
	}
	return dst
}
3446
func (actionSet ActionSet) ToSlice() []Action {
	actions := []Action{}
	for action := range actionSet {
		actions = append(actions, action)
	}

	return actions
}