xslice

package
v0.0.0-...-f89cf20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(a []interface{}, x interface{}) bool

func ContainsComparable

func ContainsComparable(a []types.Comparable, x types.Comparable) bool

func ContainsInt

func ContainsInt(a []int, x int) bool

func ContainsInt64

func ContainsInt64(a []int64, x int64) bool

func ContainsString

func ContainsString(a []string, x string) bool

func Filter

func Filter(a []interface{}, fn func(v interface{}) bool) []interface{}

func FilterInt

func FilterInt(a []int, fn func(v int) bool) []int

func FilterInt64

func FilterInt64(a []int64, fn func(v int64) bool) []int64

func FilterString

func FilterString(a []string, fn func(v string) bool) []string

func FoldLeft

func FoldLeft(a []interface{}, fn func(left, right interface{}) interface{}, initial interface{}) interface{}

func FoldRight

func FoldRight(a []interface{}, fn func(left, right interface{}) interface{}, initial interface{}) interface{}

func ForEach

func ForEach(a []interface{}, fn func(x interface{}))

func ForEachInt

func ForEachInt(a []int, fn func(x int))

func ForEachInt64

func ForEachInt64(a []int64, fn func(x int64))

func ForEachString

func ForEachString(a []string, fn func(x string))

func Map

func Map(a []interface{}, fn func(v interface{}) interface{}) []interface{}

func UniqueInt16Slice

func UniqueInt16Slice(list []int16) []int16

func UniqueInt32Slice

func UniqueInt32Slice(list []int32) []int32

func UniqueInt64Slice

func UniqueInt64Slice(list []int64) []int64

func UniqueInt8Slice

func UniqueInt8Slice(list []int8) []int8

func UniqueIntSlice

func UniqueIntSlice(list []int) []int

func UniqueSlice

func UniqueSlice(list []interface{}) []interface{}

func UniqueStringSlice

func UniqueStringSlice(list []string) []string

Types

type ZipItem

type ZipItem struct {
	Left  interface{}
	Right interface{}
}

func Zip

func Zip(a []interface{}, b []interface{}) []*ZipItem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL