func Initial(items DashSlice) DashSlice {
	length := len(items)
	result := DashSlice{}
	if length > 1 {
		result = append(result, items[0:length-1]...)
	}
	return result
}
Gets all but the last element of array.
package godash
import (
	"fmt"
	"reflect"
	"strings"
)
func Chunk(items DashSlice, size int) []DashSlice {
	dashSlices := []DashSlice{}
	for _, item := range items {
		sliceLength := len(dashSlices)
		if sliceLength == 0 || len(dashSlices[sliceLength-1]) == size {
			dashSlices = append(dashSlices, DashSlice{})
			sliceLength++
		}
		dashSlices[sliceLength-1] = append(dashSlices[sliceLength-1], item)
	}
	return dashSlices
}
func Compact(items DashSlice) DashSlice {
	dashSlice := DashSlice{}
	for _, item := range items {
		if item != nil && item != false && item != 0 && item != "" {
			dashSlice = append(dashSlice, item)
		}
	}
	return dashSlice
}
func Concat(items DashSlice, newItems ...interface{}) DashSlice {
	result := append(DashSlice{}, items...)
	for _, newItem := range newItems {
		if reflect.TypeOf(newItem).Kind() == reflect.Slice {
			values := reflect.ValueOf(newItem)
			valuesLength := values.Len()
			for i := 0; i < valuesLength; i++ {
				result = append(result, values.Index(i).Interface())
			}
		} else {
			result = append(result, newItem)
		}
	}
	return result
}
func ConcatSlices(slices ...DashSlice) DashSlice {
	result := DashSlice{}
	for _, slice := range slices {
		result = Concat(result, slice...)
	}
	return result
}
func Difference(items DashSlice, itemsToCompare ...interface{}) DashSlice {
	var result = DashSlice{}
	for _, item := range items {
		if _, ok := IndexOf(itemsToCompare, item); !ok {
			result = append(result, item)
		}
	}
	return result
}
func DifferenceBy(items DashSlice, itemsToCompare DashSlice, iteratee Iteratee) DashSlice {
	itemsNew := items.Map(iteratee)
	itemsToCompareNew := itemsToCompare.Map(iteratee)
	var result = DashSlice{}
	for i, item := range itemsNew {
		if _, ok := IndexOf(itemsToCompareNew, item); !ok {
			result = append(result, items[i])
		}
	}
	return result
}
func DifferenceWith(items DashSlice, itemsToCompare DashSlice,
	comparison Comparison) DashSlice {
	var result = DashSlice{}
	for i, item := range items {
		if _, ok := FindIndexWith(itemsToCompare, item, comparison); !ok {
			result = append(result, items[i])
		}
	}
	return result
}
func Drop(items DashSlice, count int) DashSlice {
	result := DashSlice{}
	for i := count; i < len(items); i++ {
		result = append(result, items[i])
	}
	return result
}
func DropRight(items DashSlice, count int) DashSlice {
	result := DashSlice{}
	length := len(items) - count
	for i := 0; i < length; i++ {
		result = append(result, items[i])
	}
	return result
}
func DropWhile(items DashSlice, predicate Predicate) DashSlice {
	result := DashSlice{}
	started := false
	for _, item := range items {
		if !started && !predicate(item) {
			started = true
		}
		if started {
			result = append(result, item)
		}
	}
	return result
}
func FillInRange(items DashSlice, value interface{}, start int, end int) {
	if start < 0 {
		start = 0
	}
	length := len(items)
	if end >= length {
		end = length
	}
	for i := start; i < end; i++ {
		items[i] = value
	}
}
func Fill(items DashSlice, fillValue interface{}) {
	FillInRange(items, fillValue, 0, len(items))
}
func IndexOf(items DashSlice, element interface{}) (int, bool) {
	var index = -1
	var ok bool
	for i, el := range items {
		if el == element {
			index = i
			ok = true
			break
		}
	}
	return index, ok
}
func FindIndexWith(items DashSlice, element interface{}, comparison Comparison) (int, bool) {
	var index = -1
	var ok bool
	for i, el := range items {
		if comparison(element, el) {
			index = i
			ok = true
			break
		}
	}
	return index, ok
}
func FindIndex(items DashSlice, predicate Predicate) (int, bool) {
	index := -1
	ok := false
	for i, el := range items {
		if predicate(el) {
			index = i
			ok = true
			break
		}
	}
	return index, ok
}
func LastIndexOf(items DashSlice, element interface{}) (int, bool) {
	var index = -1
	var ok bool
	length := len(items)
	reversed := make(DashSlice, length)
	copy(reversed, items)
	Reverse(reversed)
	for i, el := range reversed {
		if el == element {
			index = length - i - 1
			ok = true
			break
		}
	}
	return index, ok
}
func FindLastIndexWith(items DashSlice, element interface{}, comparison Comparison) (int, bool) {
	var index = -1
	var ok bool
	for i, el := range items {
		if comparison(element, el) {
			index = i
			ok = true
			break
		}
	}
	return index, ok
}
func FindLastIndex(items DashSlice, predicate Predicate) (int, bool) {
	index := -1
	ok := false
	for i, el := range items {
		if predicate(el) {
			index = i
			ok = true
			break
		}
	}
	return index, ok
}
func Reverse(items DashSlice) DashSlice {
	length := len(items)
	halfLen := length / 2
	for i := 0; i < halfLen; i++ {
		items[i], items[length-1-i] = items[length-1-i], items[i]
	}
	return items
}
func Head(items DashSlice) interface{} {
	if len(items) == 0 {
		return nil
	} else {
		return items[0]
	}
}
func First(items DashSlice) interface{} {
	return Head(items)
}
func flattenRecursive(item interface{}, currentDepth int, depth int) DashSlice {
	currentDepth++
	result := DashSlice{}
	if reflect.TypeOf(item).Kind() == reflect.Slice {
		sv := reflect.ValueOf(item)
		for i := 0; i < sv.Len(); i++ {
			el := sv.Index(i).Interface()
			if depth == -1 || currentDepth < depth {
				els := flattenRecursive(el, currentDepth, depth)
				result = append(result, els...)
			} else {
				result = append(result, el)
			}
		}
	} else {
		result = append(result, item)
	}
	return result
}
func Flatten(items DashSlice) DashSlice {
	result := DashSlice{}
	for _, item := range items {
		els := flattenRecursive(item, 0, 1)
		result = append(result, els...)
	}
	return result
}
func FlattenDeep(items DashSlice) DashSlice {
	result := DashSlice{}
	for _, item := range items {
		els := flattenRecursive(item, 0, -1)
		result = append(result, els...)
	}
	return result
}
func FlattenDepth(items DashSlice, depth int) DashSlice {
	result := DashSlice{}
	for _, item := range items {
		els := flattenRecursive(item, 0, depth)
		result = append(result, els...)
	}
	return result
}
func FromPairs(pairs []DashSlice) map[interface{}]interface{} {
	result := make(map[interface{}]interface{})
	for _, pair := range pairs {
		if len(pair) == 0 {
			continue
		} else if len(pair) == 1 {
			result[pair[0]] = nil
		} else {
			result[pair[0]] = pair[1]
		}
	}
	return result
}