genesis

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 8 Imported by: 0

README

Genesis

Missed golang generic stdlib for slices and channels.

Some functions:

  • Filter, Map, Reduce.
  • Min, Max, Sum.
  • Permutations, Product.
  • Any, All.
  • Contains, Find.
  • Shuffle, Sort.
  • Range, Count, Cycle.

And much more.

Features:

  • Typesafe.
  • Sync and async versions.
  • For slices and channels.
  • Pre-generated for all built-in types.
go get github.com/life4/genesis

Examples

Find minimal value in a slice of ints:

s := []int{42, 7, 13}
min := genesis.SliceInt{s}.Min()

Double values in a slice of ints:

s := []int{4, 8, 15, 16, 23, 42}
double := func(el int) int { return el * 2 }
doubled := genesis.SliceInt{s}.MapInt(double)

See docs to dive deeper.

Custom types

Genesis contains pre-generated code for common built-in types. So, in most cases you can just use it. However, if you want to use genesis for custom types, things become a little bit more complicated. The first option is to use an empty interface. For example:

type UserId int
ids := []UserId{1, 2, 3, 4, 5}
// https://github.com/golang/go/wiki/InterfaceSlice
idsInterface := make([]interface{}, len(ids), len(ids))
for i := range ids {
	idsInterface[i] = ids[i]
}
index := genesis.SliceInterface{idsInterface}.FindIndex(
	func(el interface{}) bool { return el.(UserId) == 3 },
)
fmt.Println(index)
// Output: 2

Another option is to generate genesis code for your own type.

Generation

Install requirements

python3 -m pip install --user -r requirements.txt

Re-generate everything for built-in types:

python3 -m generate

Generate a new package with given types:

python3 -m generate

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmpty = errors.New("container is empty")
View Source
var ErrNegativeValue = errors.New("negative value passed")
View Source
var ErrNonPositiveValue = errors.New("value must be positive")
View Source
var ErrNotFound = errors.New("given element is not found")
View Source
var ErrOutOfRange = errors.New("index is bigger than container size")

Functions

This section is empty.

Types

type AsyncSliceBool

type AsyncSliceBool struct {
	Data    []bool
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceBool) All

func (s AsyncSliceBool) All(f func(el bool) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceBool) Any

func (s AsyncSliceBool) Any(f func(el bool) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceBool) Each

func (s AsyncSliceBool) Each(f func(el bool))

Each calls f for every element from slice

func (AsyncSliceBool) Filter

func (s AsyncSliceBool) Filter(f func(el bool) bool) []bool

Filter returns slice of element for which f returns true

func (AsyncSliceBool) MapBool

func (s AsyncSliceBool) MapBool(f func(el bool) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapByte

func (s AsyncSliceBool) MapByte(f func(el bool) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapError

func (s AsyncSliceBool) MapError(f func(el bool) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapFloat32

func (s AsyncSliceBool) MapFloat32(f func(el bool) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapFloat64

func (s AsyncSliceBool) MapFloat64(f func(el bool) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapInt

func (s AsyncSliceBool) MapInt(f func(el bool) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapInt16

func (s AsyncSliceBool) MapInt16(f func(el bool) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapInt32

func (s AsyncSliceBool) MapInt32(f func(el bool) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapInt64

func (s AsyncSliceBool) MapInt64(f func(el bool) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapInt8

func (s AsyncSliceBool) MapInt8(f func(el bool) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapInterface

func (s AsyncSliceBool) MapInterface(f func(el bool) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapRune

func (s AsyncSliceBool) MapRune(f func(el bool) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapString

func (s AsyncSliceBool) MapString(f func(el bool) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapUint

func (s AsyncSliceBool) MapUint(f func(el bool) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapUint16

func (s AsyncSliceBool) MapUint16(f func(el bool) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapUint32

func (s AsyncSliceBool) MapUint32(f func(el bool) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapUint64

func (s AsyncSliceBool) MapUint64(f func(el bool) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) MapUint8

func (s AsyncSliceBool) MapUint8(f func(el bool) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceBool) Reduce

func (s AsyncSliceBool) Reduce(f func(left bool, right bool) bool) bool

Reduce reduces slice to a single value with f

type AsyncSliceByte

type AsyncSliceByte struct {
	Data    []byte
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceByte) All

func (s AsyncSliceByte) All(f func(el byte) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceByte) Any

func (s AsyncSliceByte) Any(f func(el byte) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceByte) Each

func (s AsyncSliceByte) Each(f func(el byte))

Each calls f for every element from slice

func (AsyncSliceByte) Filter

func (s AsyncSliceByte) Filter(f func(el byte) bool) []byte

Filter returns slice of element for which f returns true

func (AsyncSliceByte) MapBool

func (s AsyncSliceByte) MapBool(f func(el byte) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapByte

func (s AsyncSliceByte) MapByte(f func(el byte) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapError

func (s AsyncSliceByte) MapError(f func(el byte) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapFloat32

func (s AsyncSliceByte) MapFloat32(f func(el byte) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapFloat64

func (s AsyncSliceByte) MapFloat64(f func(el byte) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapInt

func (s AsyncSliceByte) MapInt(f func(el byte) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapInt16

func (s AsyncSliceByte) MapInt16(f func(el byte) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapInt32

func (s AsyncSliceByte) MapInt32(f func(el byte) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapInt64

func (s AsyncSliceByte) MapInt64(f func(el byte) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapInt8

func (s AsyncSliceByte) MapInt8(f func(el byte) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapInterface

func (s AsyncSliceByte) MapInterface(f func(el byte) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapRune

func (s AsyncSliceByte) MapRune(f func(el byte) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapString

func (s AsyncSliceByte) MapString(f func(el byte) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapUint

func (s AsyncSliceByte) MapUint(f func(el byte) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapUint16

func (s AsyncSliceByte) MapUint16(f func(el byte) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapUint32

func (s AsyncSliceByte) MapUint32(f func(el byte) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapUint64

func (s AsyncSliceByte) MapUint64(f func(el byte) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) MapUint8

func (s AsyncSliceByte) MapUint8(f func(el byte) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceByte) Reduce

func (s AsyncSliceByte) Reduce(f func(left byte, right byte) byte) byte

Reduce reduces slice to a single value with f

type AsyncSliceError

type AsyncSliceError struct {
	Data    []error
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceError) All

func (s AsyncSliceError) All(f func(el error) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceError) Any

func (s AsyncSliceError) Any(f func(el error) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceError) Each

func (s AsyncSliceError) Each(f func(el error))

Each calls f for every element from slice

func (AsyncSliceError) Filter

func (s AsyncSliceError) Filter(f func(el error) bool) []error

Filter returns slice of element for which f returns true

func (AsyncSliceError) MapBool

func (s AsyncSliceError) MapBool(f func(el error) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapByte

func (s AsyncSliceError) MapByte(f func(el error) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapError

func (s AsyncSliceError) MapError(f func(el error) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapFloat32

func (s AsyncSliceError) MapFloat32(f func(el error) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapFloat64

func (s AsyncSliceError) MapFloat64(f func(el error) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapInt

func (s AsyncSliceError) MapInt(f func(el error) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapInt16

func (s AsyncSliceError) MapInt16(f func(el error) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapInt32

func (s AsyncSliceError) MapInt32(f func(el error) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapInt64

func (s AsyncSliceError) MapInt64(f func(el error) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapInt8

func (s AsyncSliceError) MapInt8(f func(el error) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapInterface

func (s AsyncSliceError) MapInterface(f func(el error) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapRune

func (s AsyncSliceError) MapRune(f func(el error) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapString

func (s AsyncSliceError) MapString(f func(el error) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapUint

func (s AsyncSliceError) MapUint(f func(el error) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapUint16

func (s AsyncSliceError) MapUint16(f func(el error) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapUint32

func (s AsyncSliceError) MapUint32(f func(el error) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapUint64

func (s AsyncSliceError) MapUint64(f func(el error) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) MapUint8

func (s AsyncSliceError) MapUint8(f func(el error) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceError) Reduce

func (s AsyncSliceError) Reduce(f func(left error, right error) error) error

Reduce reduces slice to a single value with f

type AsyncSliceFloat32

type AsyncSliceFloat32 struct {
	Data    []float32
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceFloat32) All

func (s AsyncSliceFloat32) All(f func(el float32) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceFloat32) Any

func (s AsyncSliceFloat32) Any(f func(el float32) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceFloat32) Each

func (s AsyncSliceFloat32) Each(f func(el float32))

Each calls f for every element from slice

func (AsyncSliceFloat32) Filter

func (s AsyncSliceFloat32) Filter(f func(el float32) bool) []float32

Filter returns slice of element for which f returns true

func (AsyncSliceFloat32) MapBool

func (s AsyncSliceFloat32) MapBool(f func(el float32) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapByte

func (s AsyncSliceFloat32) MapByte(f func(el float32) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapError

func (s AsyncSliceFloat32) MapError(f func(el float32) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapFloat32

func (s AsyncSliceFloat32) MapFloat32(f func(el float32) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapFloat64

func (s AsyncSliceFloat32) MapFloat64(f func(el float32) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapInt

func (s AsyncSliceFloat32) MapInt(f func(el float32) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapInt16

func (s AsyncSliceFloat32) MapInt16(f func(el float32) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapInt32

func (s AsyncSliceFloat32) MapInt32(f func(el float32) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapInt64

func (s AsyncSliceFloat32) MapInt64(f func(el float32) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapInt8

func (s AsyncSliceFloat32) MapInt8(f func(el float32) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapInterface

func (s AsyncSliceFloat32) MapInterface(f func(el float32) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapRune

func (s AsyncSliceFloat32) MapRune(f func(el float32) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapString

func (s AsyncSliceFloat32) MapString(f func(el float32) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapUint

func (s AsyncSliceFloat32) MapUint(f func(el float32) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapUint16

func (s AsyncSliceFloat32) MapUint16(f func(el float32) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapUint32

func (s AsyncSliceFloat32) MapUint32(f func(el float32) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapUint64

func (s AsyncSliceFloat32) MapUint64(f func(el float32) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) MapUint8

func (s AsyncSliceFloat32) MapUint8(f func(el float32) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat32) Reduce

func (s AsyncSliceFloat32) Reduce(f func(left float32, right float32) float32) float32

Reduce reduces slice to a single value with f

type AsyncSliceFloat64

type AsyncSliceFloat64 struct {
	Data    []float64
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceFloat64) All

func (s AsyncSliceFloat64) All(f func(el float64) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceFloat64) Any

func (s AsyncSliceFloat64) Any(f func(el float64) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceFloat64) Each

func (s AsyncSliceFloat64) Each(f func(el float64))

Each calls f for every element from slice

func (AsyncSliceFloat64) Filter

func (s AsyncSliceFloat64) Filter(f func(el float64) bool) []float64

Filter returns slice of element for which f returns true

func (AsyncSliceFloat64) MapBool

func (s AsyncSliceFloat64) MapBool(f func(el float64) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapByte

func (s AsyncSliceFloat64) MapByte(f func(el float64) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapError

func (s AsyncSliceFloat64) MapError(f func(el float64) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapFloat32

func (s AsyncSliceFloat64) MapFloat32(f func(el float64) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapFloat64

func (s AsyncSliceFloat64) MapFloat64(f func(el float64) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapInt

func (s AsyncSliceFloat64) MapInt(f func(el float64) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapInt16

func (s AsyncSliceFloat64) MapInt16(f func(el float64) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapInt32

func (s AsyncSliceFloat64) MapInt32(f func(el float64) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapInt64

func (s AsyncSliceFloat64) MapInt64(f func(el float64) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapInt8

func (s AsyncSliceFloat64) MapInt8(f func(el float64) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapInterface

func (s AsyncSliceFloat64) MapInterface(f func(el float64) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapRune

func (s AsyncSliceFloat64) MapRune(f func(el float64) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapString

func (s AsyncSliceFloat64) MapString(f func(el float64) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapUint

func (s AsyncSliceFloat64) MapUint(f func(el float64) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapUint16

func (s AsyncSliceFloat64) MapUint16(f func(el float64) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapUint32

func (s AsyncSliceFloat64) MapUint32(f func(el float64) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapUint64

func (s AsyncSliceFloat64) MapUint64(f func(el float64) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) MapUint8

func (s AsyncSliceFloat64) MapUint8(f func(el float64) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceFloat64) Reduce

func (s AsyncSliceFloat64) Reduce(f func(left float64, right float64) float64) float64

Reduce reduces slice to a single value with f

type AsyncSliceInt

type AsyncSliceInt struct {
	Data    []int
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceInt) All

func (s AsyncSliceInt) All(f func(el int) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceInt) Any

func (s AsyncSliceInt) Any(f func(el int) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceInt) Each

func (s AsyncSliceInt) Each(f func(el int))

Each calls f for every element from slice

func (AsyncSliceInt) Filter

func (s AsyncSliceInt) Filter(f func(el int) bool) []int

Filter returns slice of element for which f returns true

func (AsyncSliceInt) MapBool

func (s AsyncSliceInt) MapBool(f func(el int) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapByte

func (s AsyncSliceInt) MapByte(f func(el int) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapError

func (s AsyncSliceInt) MapError(f func(el int) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapFloat32

func (s AsyncSliceInt) MapFloat32(f func(el int) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapFloat64

func (s AsyncSliceInt) MapFloat64(f func(el int) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapInt

func (s AsyncSliceInt) MapInt(f func(el int) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapInt16

func (s AsyncSliceInt) MapInt16(f func(el int) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapInt32

func (s AsyncSliceInt) MapInt32(f func(el int) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapInt64

func (s AsyncSliceInt) MapInt64(f func(el int) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapInt8

func (s AsyncSliceInt) MapInt8(f func(el int) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapInterface

func (s AsyncSliceInt) MapInterface(f func(el int) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapRune

func (s AsyncSliceInt) MapRune(f func(el int) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapString

func (s AsyncSliceInt) MapString(f func(el int) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapUint

func (s AsyncSliceInt) MapUint(f func(el int) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapUint16

func (s AsyncSliceInt) MapUint16(f func(el int) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapUint32

func (s AsyncSliceInt) MapUint32(f func(el int) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapUint64

func (s AsyncSliceInt) MapUint64(f func(el int) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) MapUint8

func (s AsyncSliceInt) MapUint8(f func(el int) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt) Reduce

func (s AsyncSliceInt) Reduce(f func(left int, right int) int) int

Reduce reduces slice to a single value with f

type AsyncSliceInt16

type AsyncSliceInt16 struct {
	Data    []int16
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceInt16) All

func (s AsyncSliceInt16) All(f func(el int16) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceInt16) Any

func (s AsyncSliceInt16) Any(f func(el int16) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceInt16) Each

func (s AsyncSliceInt16) Each(f func(el int16))

Each calls f for every element from slice

func (AsyncSliceInt16) Filter

func (s AsyncSliceInt16) Filter(f func(el int16) bool) []int16

Filter returns slice of element for which f returns true

func (AsyncSliceInt16) MapBool

func (s AsyncSliceInt16) MapBool(f func(el int16) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapByte

func (s AsyncSliceInt16) MapByte(f func(el int16) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapError

func (s AsyncSliceInt16) MapError(f func(el int16) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapFloat32

func (s AsyncSliceInt16) MapFloat32(f func(el int16) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapFloat64

func (s AsyncSliceInt16) MapFloat64(f func(el int16) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapInt

func (s AsyncSliceInt16) MapInt(f func(el int16) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapInt16

func (s AsyncSliceInt16) MapInt16(f func(el int16) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapInt32

func (s AsyncSliceInt16) MapInt32(f func(el int16) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapInt64

func (s AsyncSliceInt16) MapInt64(f func(el int16) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapInt8

func (s AsyncSliceInt16) MapInt8(f func(el int16) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapInterface

func (s AsyncSliceInt16) MapInterface(f func(el int16) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapRune

func (s AsyncSliceInt16) MapRune(f func(el int16) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapString

func (s AsyncSliceInt16) MapString(f func(el int16) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapUint

func (s AsyncSliceInt16) MapUint(f func(el int16) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapUint16

func (s AsyncSliceInt16) MapUint16(f func(el int16) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapUint32

func (s AsyncSliceInt16) MapUint32(f func(el int16) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapUint64

func (s AsyncSliceInt16) MapUint64(f func(el int16) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) MapUint8

func (s AsyncSliceInt16) MapUint8(f func(el int16) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt16) Reduce

func (s AsyncSliceInt16) Reduce(f func(left int16, right int16) int16) int16

Reduce reduces slice to a single value with f

type AsyncSliceInt32

type AsyncSliceInt32 struct {
	Data    []int32
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceInt32) All

func (s AsyncSliceInt32) All(f func(el int32) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceInt32) Any

func (s AsyncSliceInt32) Any(f func(el int32) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceInt32) Each

func (s AsyncSliceInt32) Each(f func(el int32))

Each calls f for every element from slice

func (AsyncSliceInt32) Filter

func (s AsyncSliceInt32) Filter(f func(el int32) bool) []int32

Filter returns slice of element for which f returns true

func (AsyncSliceInt32) MapBool

func (s AsyncSliceInt32) MapBool(f func(el int32) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapByte

func (s AsyncSliceInt32) MapByte(f func(el int32) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapError

func (s AsyncSliceInt32) MapError(f func(el int32) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapFloat32

func (s AsyncSliceInt32) MapFloat32(f func(el int32) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapFloat64

func (s AsyncSliceInt32) MapFloat64(f func(el int32) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapInt

func (s AsyncSliceInt32) MapInt(f func(el int32) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapInt16

func (s AsyncSliceInt32) MapInt16(f func(el int32) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapInt32

func (s AsyncSliceInt32) MapInt32(f func(el int32) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapInt64

func (s AsyncSliceInt32) MapInt64(f func(el int32) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapInt8

func (s AsyncSliceInt32) MapInt8(f func(el int32) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapInterface

func (s AsyncSliceInt32) MapInterface(f func(el int32) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapRune

func (s AsyncSliceInt32) MapRune(f func(el int32) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapString

func (s AsyncSliceInt32) MapString(f func(el int32) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapUint

func (s AsyncSliceInt32) MapUint(f func(el int32) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapUint16

func (s AsyncSliceInt32) MapUint16(f func(el int32) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapUint32

func (s AsyncSliceInt32) MapUint32(f func(el int32) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapUint64

func (s AsyncSliceInt32) MapUint64(f func(el int32) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) MapUint8

func (s AsyncSliceInt32) MapUint8(f func(el int32) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt32) Reduce

func (s AsyncSliceInt32) Reduce(f func(left int32, right int32) int32) int32

Reduce reduces slice to a single value with f

type AsyncSliceInt64

type AsyncSliceInt64 struct {
	Data    []int64
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceInt64) All

func (s AsyncSliceInt64) All(f func(el int64) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceInt64) Any

func (s AsyncSliceInt64) Any(f func(el int64) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceInt64) Each

func (s AsyncSliceInt64) Each(f func(el int64))

Each calls f for every element from slice

func (AsyncSliceInt64) Filter

func (s AsyncSliceInt64) Filter(f func(el int64) bool) []int64

Filter returns slice of element for which f returns true

func (AsyncSliceInt64) MapBool

func (s AsyncSliceInt64) MapBool(f func(el int64) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapByte

func (s AsyncSliceInt64) MapByte(f func(el int64) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapError

func (s AsyncSliceInt64) MapError(f func(el int64) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapFloat32

func (s AsyncSliceInt64) MapFloat32(f func(el int64) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapFloat64

func (s AsyncSliceInt64) MapFloat64(f func(el int64) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapInt

func (s AsyncSliceInt64) MapInt(f func(el int64) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapInt16

func (s AsyncSliceInt64) MapInt16(f func(el int64) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapInt32

func (s AsyncSliceInt64) MapInt32(f func(el int64) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapInt64

func (s AsyncSliceInt64) MapInt64(f func(el int64) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapInt8

func (s AsyncSliceInt64) MapInt8(f func(el int64) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapInterface

func (s AsyncSliceInt64) MapInterface(f func(el int64) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapRune

func (s AsyncSliceInt64) MapRune(f func(el int64) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapString

func (s AsyncSliceInt64) MapString(f func(el int64) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapUint

func (s AsyncSliceInt64) MapUint(f func(el int64) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapUint16

func (s AsyncSliceInt64) MapUint16(f func(el int64) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapUint32

func (s AsyncSliceInt64) MapUint32(f func(el int64) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapUint64

func (s AsyncSliceInt64) MapUint64(f func(el int64) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) MapUint8

func (s AsyncSliceInt64) MapUint8(f func(el int64) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt64) Reduce

func (s AsyncSliceInt64) Reduce(f func(left int64, right int64) int64) int64

Reduce reduces slice to a single value with f

type AsyncSliceInt8

type AsyncSliceInt8 struct {
	Data    []int8
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceInt8) All

func (s AsyncSliceInt8) All(f func(el int8) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceInt8) Any

func (s AsyncSliceInt8) Any(f func(el int8) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceInt8) Each

func (s AsyncSliceInt8) Each(f func(el int8))

Each calls f for every element from slice

func (AsyncSliceInt8) Filter

func (s AsyncSliceInt8) Filter(f func(el int8) bool) []int8

Filter returns slice of element for which f returns true

func (AsyncSliceInt8) MapBool

func (s AsyncSliceInt8) MapBool(f func(el int8) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapByte

func (s AsyncSliceInt8) MapByte(f func(el int8) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapError

func (s AsyncSliceInt8) MapError(f func(el int8) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapFloat32

func (s AsyncSliceInt8) MapFloat32(f func(el int8) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapFloat64

func (s AsyncSliceInt8) MapFloat64(f func(el int8) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapInt

func (s AsyncSliceInt8) MapInt(f func(el int8) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapInt16

func (s AsyncSliceInt8) MapInt16(f func(el int8) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapInt32

func (s AsyncSliceInt8) MapInt32(f func(el int8) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapInt64

func (s AsyncSliceInt8) MapInt64(f func(el int8) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapInt8

func (s AsyncSliceInt8) MapInt8(f func(el int8) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapInterface

func (s AsyncSliceInt8) MapInterface(f func(el int8) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapRune

func (s AsyncSliceInt8) MapRune(f func(el int8) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapString

func (s AsyncSliceInt8) MapString(f func(el int8) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapUint

func (s AsyncSliceInt8) MapUint(f func(el int8) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapUint16

func (s AsyncSliceInt8) MapUint16(f func(el int8) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapUint32

func (s AsyncSliceInt8) MapUint32(f func(el int8) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapUint64

func (s AsyncSliceInt8) MapUint64(f func(el int8) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) MapUint8

func (s AsyncSliceInt8) MapUint8(f func(el int8) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInt8) Reduce

func (s AsyncSliceInt8) Reduce(f func(left int8, right int8) int8) int8

Reduce reduces slice to a single value with f

type AsyncSliceInterface

type AsyncSliceInterface struct {
	Data    []interface{}
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceInterface) All

func (s AsyncSliceInterface) All(f func(el interface{}) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceInterface) Any

func (s AsyncSliceInterface) Any(f func(el interface{}) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceInterface) Each

func (s AsyncSliceInterface) Each(f func(el interface{}))

Each calls f for every element from slice

func (AsyncSliceInterface) Filter

func (s AsyncSliceInterface) Filter(f func(el interface{}) bool) []interface{}

Filter returns slice of element for which f returns true

func (AsyncSliceInterface) MapBool

func (s AsyncSliceInterface) MapBool(f func(el interface{}) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapByte

func (s AsyncSliceInterface) MapByte(f func(el interface{}) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapError

func (s AsyncSliceInterface) MapError(f func(el interface{}) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapFloat32

func (s AsyncSliceInterface) MapFloat32(f func(el interface{}) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapFloat64

func (s AsyncSliceInterface) MapFloat64(f func(el interface{}) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapInt

func (s AsyncSliceInterface) MapInt(f func(el interface{}) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapInt16

func (s AsyncSliceInterface) MapInt16(f func(el interface{}) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapInt32

func (s AsyncSliceInterface) MapInt32(f func(el interface{}) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapInt64

func (s AsyncSliceInterface) MapInt64(f func(el interface{}) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapInt8

func (s AsyncSliceInterface) MapInt8(f func(el interface{}) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapInterface

func (s AsyncSliceInterface) MapInterface(f func(el interface{}) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapRune

func (s AsyncSliceInterface) MapRune(f func(el interface{}) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapString

func (s AsyncSliceInterface) MapString(f func(el interface{}) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapUint

func (s AsyncSliceInterface) MapUint(f func(el interface{}) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapUint16

func (s AsyncSliceInterface) MapUint16(f func(el interface{}) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapUint32

func (s AsyncSliceInterface) MapUint32(f func(el interface{}) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapUint64

func (s AsyncSliceInterface) MapUint64(f func(el interface{}) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) MapUint8

func (s AsyncSliceInterface) MapUint8(f func(el interface{}) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceInterface) Reduce

func (s AsyncSliceInterface) Reduce(f func(left interface{}, right interface{}) interface{}) interface{}

Reduce reduces slice to a single value with f

type AsyncSliceRune

type AsyncSliceRune struct {
	Data    []rune
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceRune) All

func (s AsyncSliceRune) All(f func(el rune) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceRune) Any

func (s AsyncSliceRune) Any(f func(el rune) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceRune) Each

func (s AsyncSliceRune) Each(f func(el rune))

Each calls f for every element from slice

func (AsyncSliceRune) Filter

func (s AsyncSliceRune) Filter(f func(el rune) bool) []rune

Filter returns slice of element for which f returns true

func (AsyncSliceRune) MapBool

func (s AsyncSliceRune) MapBool(f func(el rune) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapByte

func (s AsyncSliceRune) MapByte(f func(el rune) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapError

func (s AsyncSliceRune) MapError(f func(el rune) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapFloat32

func (s AsyncSliceRune) MapFloat32(f func(el rune) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapFloat64

func (s AsyncSliceRune) MapFloat64(f func(el rune) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapInt

func (s AsyncSliceRune) MapInt(f func(el rune) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapInt16

func (s AsyncSliceRune) MapInt16(f func(el rune) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapInt32

func (s AsyncSliceRune) MapInt32(f func(el rune) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapInt64

func (s AsyncSliceRune) MapInt64(f func(el rune) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapInt8

func (s AsyncSliceRune) MapInt8(f func(el rune) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapInterface

func (s AsyncSliceRune) MapInterface(f func(el rune) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapRune

func (s AsyncSliceRune) MapRune(f func(el rune) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapString

func (s AsyncSliceRune) MapString(f func(el rune) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapUint

func (s AsyncSliceRune) MapUint(f func(el rune) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapUint16

func (s AsyncSliceRune) MapUint16(f func(el rune) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapUint32

func (s AsyncSliceRune) MapUint32(f func(el rune) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapUint64

func (s AsyncSliceRune) MapUint64(f func(el rune) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) MapUint8

func (s AsyncSliceRune) MapUint8(f func(el rune) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceRune) Reduce

func (s AsyncSliceRune) Reduce(f func(left rune, right rune) rune) rune

Reduce reduces slice to a single value with f

type AsyncSliceString

type AsyncSliceString struct {
	Data    []string
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceString) All

func (s AsyncSliceString) All(f func(el string) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceString) Any

func (s AsyncSliceString) Any(f func(el string) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceString) Each

func (s AsyncSliceString) Each(f func(el string))

Each calls f for every element from slice

func (AsyncSliceString) Filter

func (s AsyncSliceString) Filter(f func(el string) bool) []string

Filter returns slice of element for which f returns true

func (AsyncSliceString) MapBool

func (s AsyncSliceString) MapBool(f func(el string) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapByte

func (s AsyncSliceString) MapByte(f func(el string) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapError

func (s AsyncSliceString) MapError(f func(el string) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapFloat32

func (s AsyncSliceString) MapFloat32(f func(el string) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapFloat64

func (s AsyncSliceString) MapFloat64(f func(el string) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapInt

func (s AsyncSliceString) MapInt(f func(el string) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapInt16

func (s AsyncSliceString) MapInt16(f func(el string) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapInt32

func (s AsyncSliceString) MapInt32(f func(el string) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapInt64

func (s AsyncSliceString) MapInt64(f func(el string) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapInt8

func (s AsyncSliceString) MapInt8(f func(el string) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapInterface

func (s AsyncSliceString) MapInterface(f func(el string) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapRune

func (s AsyncSliceString) MapRune(f func(el string) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapString

func (s AsyncSliceString) MapString(f func(el string) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapUint

func (s AsyncSliceString) MapUint(f func(el string) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapUint16

func (s AsyncSliceString) MapUint16(f func(el string) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapUint32

func (s AsyncSliceString) MapUint32(f func(el string) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapUint64

func (s AsyncSliceString) MapUint64(f func(el string) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) MapUint8

func (s AsyncSliceString) MapUint8(f func(el string) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceString) Reduce

func (s AsyncSliceString) Reduce(f func(left string, right string) string) string

Reduce reduces slice to a single value with f

type AsyncSliceUint

type AsyncSliceUint struct {
	Data    []uint
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceUint) All

func (s AsyncSliceUint) All(f func(el uint) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceUint) Any

func (s AsyncSliceUint) Any(f func(el uint) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceUint) Each

func (s AsyncSliceUint) Each(f func(el uint))

Each calls f for every element from slice

func (AsyncSliceUint) Filter

func (s AsyncSliceUint) Filter(f func(el uint) bool) []uint

Filter returns slice of element for which f returns true

func (AsyncSliceUint) MapBool

func (s AsyncSliceUint) MapBool(f func(el uint) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapByte

func (s AsyncSliceUint) MapByte(f func(el uint) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapError

func (s AsyncSliceUint) MapError(f func(el uint) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapFloat32

func (s AsyncSliceUint) MapFloat32(f func(el uint) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapFloat64

func (s AsyncSliceUint) MapFloat64(f func(el uint) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapInt

func (s AsyncSliceUint) MapInt(f func(el uint) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapInt16

func (s AsyncSliceUint) MapInt16(f func(el uint) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapInt32

func (s AsyncSliceUint) MapInt32(f func(el uint) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapInt64

func (s AsyncSliceUint) MapInt64(f func(el uint) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapInt8

func (s AsyncSliceUint) MapInt8(f func(el uint) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapInterface

func (s AsyncSliceUint) MapInterface(f func(el uint) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapRune

func (s AsyncSliceUint) MapRune(f func(el uint) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapString

func (s AsyncSliceUint) MapString(f func(el uint) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapUint

func (s AsyncSliceUint) MapUint(f func(el uint) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapUint16

func (s AsyncSliceUint) MapUint16(f func(el uint) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapUint32

func (s AsyncSliceUint) MapUint32(f func(el uint) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapUint64

func (s AsyncSliceUint) MapUint64(f func(el uint) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) MapUint8

func (s AsyncSliceUint) MapUint8(f func(el uint) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint) Reduce

func (s AsyncSliceUint) Reduce(f func(left uint, right uint) uint) uint

Reduce reduces slice to a single value with f

type AsyncSliceUint16

type AsyncSliceUint16 struct {
	Data    []uint16
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceUint16) All

func (s AsyncSliceUint16) All(f func(el uint16) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceUint16) Any

func (s AsyncSliceUint16) Any(f func(el uint16) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceUint16) Each

func (s AsyncSliceUint16) Each(f func(el uint16))

Each calls f for every element from slice

func (AsyncSliceUint16) Filter

func (s AsyncSliceUint16) Filter(f func(el uint16) bool) []uint16

Filter returns slice of element for which f returns true

func (AsyncSliceUint16) MapBool

func (s AsyncSliceUint16) MapBool(f func(el uint16) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapByte

func (s AsyncSliceUint16) MapByte(f func(el uint16) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapError

func (s AsyncSliceUint16) MapError(f func(el uint16) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapFloat32

func (s AsyncSliceUint16) MapFloat32(f func(el uint16) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapFloat64

func (s AsyncSliceUint16) MapFloat64(f func(el uint16) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapInt

func (s AsyncSliceUint16) MapInt(f func(el uint16) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapInt16

func (s AsyncSliceUint16) MapInt16(f func(el uint16) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapInt32

func (s AsyncSliceUint16) MapInt32(f func(el uint16) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapInt64

func (s AsyncSliceUint16) MapInt64(f func(el uint16) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapInt8

func (s AsyncSliceUint16) MapInt8(f func(el uint16) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapInterface

func (s AsyncSliceUint16) MapInterface(f func(el uint16) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapRune

func (s AsyncSliceUint16) MapRune(f func(el uint16) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapString

func (s AsyncSliceUint16) MapString(f func(el uint16) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapUint

func (s AsyncSliceUint16) MapUint(f func(el uint16) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapUint16

func (s AsyncSliceUint16) MapUint16(f func(el uint16) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapUint32

func (s AsyncSliceUint16) MapUint32(f func(el uint16) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapUint64

func (s AsyncSliceUint16) MapUint64(f func(el uint16) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) MapUint8

func (s AsyncSliceUint16) MapUint8(f func(el uint16) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint16) Reduce

func (s AsyncSliceUint16) Reduce(f func(left uint16, right uint16) uint16) uint16

Reduce reduces slice to a single value with f

type AsyncSliceUint32

type AsyncSliceUint32 struct {
	Data    []uint32
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceUint32) All

func (s AsyncSliceUint32) All(f func(el uint32) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceUint32) Any

func (s AsyncSliceUint32) Any(f func(el uint32) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceUint32) Each

func (s AsyncSliceUint32) Each(f func(el uint32))

Each calls f for every element from slice

func (AsyncSliceUint32) Filter

func (s AsyncSliceUint32) Filter(f func(el uint32) bool) []uint32

Filter returns slice of element for which f returns true

func (AsyncSliceUint32) MapBool

func (s AsyncSliceUint32) MapBool(f func(el uint32) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapByte

func (s AsyncSliceUint32) MapByte(f func(el uint32) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapError

func (s AsyncSliceUint32) MapError(f func(el uint32) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapFloat32

func (s AsyncSliceUint32) MapFloat32(f func(el uint32) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapFloat64

func (s AsyncSliceUint32) MapFloat64(f func(el uint32) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapInt

func (s AsyncSliceUint32) MapInt(f func(el uint32) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapInt16

func (s AsyncSliceUint32) MapInt16(f func(el uint32) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapInt32

func (s AsyncSliceUint32) MapInt32(f func(el uint32) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapInt64

func (s AsyncSliceUint32) MapInt64(f func(el uint32) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapInt8

func (s AsyncSliceUint32) MapInt8(f func(el uint32) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapInterface

func (s AsyncSliceUint32) MapInterface(f func(el uint32) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapRune

func (s AsyncSliceUint32) MapRune(f func(el uint32) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapString

func (s AsyncSliceUint32) MapString(f func(el uint32) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapUint

func (s AsyncSliceUint32) MapUint(f func(el uint32) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapUint16

func (s AsyncSliceUint32) MapUint16(f func(el uint32) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapUint32

func (s AsyncSliceUint32) MapUint32(f func(el uint32) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapUint64

func (s AsyncSliceUint32) MapUint64(f func(el uint32) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) MapUint8

func (s AsyncSliceUint32) MapUint8(f func(el uint32) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint32) Reduce

func (s AsyncSliceUint32) Reduce(f func(left uint32, right uint32) uint32) uint32

Reduce reduces slice to a single value with f

type AsyncSliceUint64

type AsyncSliceUint64 struct {
	Data    []uint64
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceUint64) All

func (s AsyncSliceUint64) All(f func(el uint64) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceUint64) Any

func (s AsyncSliceUint64) Any(f func(el uint64) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceUint64) Each

func (s AsyncSliceUint64) Each(f func(el uint64))

Each calls f for every element from slice

func (AsyncSliceUint64) Filter

func (s AsyncSliceUint64) Filter(f func(el uint64) bool) []uint64

Filter returns slice of element for which f returns true

func (AsyncSliceUint64) MapBool

func (s AsyncSliceUint64) MapBool(f func(el uint64) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapByte

func (s AsyncSliceUint64) MapByte(f func(el uint64) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapError

func (s AsyncSliceUint64) MapError(f func(el uint64) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapFloat32

func (s AsyncSliceUint64) MapFloat32(f func(el uint64) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapFloat64

func (s AsyncSliceUint64) MapFloat64(f func(el uint64) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapInt

func (s AsyncSliceUint64) MapInt(f func(el uint64) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapInt16

func (s AsyncSliceUint64) MapInt16(f func(el uint64) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapInt32

func (s AsyncSliceUint64) MapInt32(f func(el uint64) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapInt64

func (s AsyncSliceUint64) MapInt64(f func(el uint64) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapInt8

func (s AsyncSliceUint64) MapInt8(f func(el uint64) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapInterface

func (s AsyncSliceUint64) MapInterface(f func(el uint64) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapRune

func (s AsyncSliceUint64) MapRune(f func(el uint64) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapString

func (s AsyncSliceUint64) MapString(f func(el uint64) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapUint

func (s AsyncSliceUint64) MapUint(f func(el uint64) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapUint16

func (s AsyncSliceUint64) MapUint16(f func(el uint64) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapUint32

func (s AsyncSliceUint64) MapUint32(f func(el uint64) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapUint64

func (s AsyncSliceUint64) MapUint64(f func(el uint64) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) MapUint8

func (s AsyncSliceUint64) MapUint8(f func(el uint64) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint64) Reduce

func (s AsyncSliceUint64) Reduce(f func(left uint64, right uint64) uint64) uint64

Reduce reduces slice to a single value with f

type AsyncSliceUint8

type AsyncSliceUint8 struct {
	Data    []uint8
	Workers int
}

AsyncSlice is a set of operations to work with slice asynchronously

func (AsyncSliceUint8) All

func (s AsyncSliceUint8) All(f func(el uint8) bool) bool

All returns true if f returns true for all elements in slice

func (AsyncSliceUint8) Any

func (s AsyncSliceUint8) Any(f func(el uint8) bool) bool

Any returns true if f returns true for any element from slice

func (AsyncSliceUint8) Each

func (s AsyncSliceUint8) Each(f func(el uint8))

Each calls f for every element from slice

func (AsyncSliceUint8) Filter

func (s AsyncSliceUint8) Filter(f func(el uint8) bool) []uint8

Filter returns slice of element for which f returns true

func (AsyncSliceUint8) MapBool

func (s AsyncSliceUint8) MapBool(f func(el uint8) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapByte

func (s AsyncSliceUint8) MapByte(f func(el uint8) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapError

func (s AsyncSliceUint8) MapError(f func(el uint8) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapFloat32

func (s AsyncSliceUint8) MapFloat32(f func(el uint8) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapFloat64

func (s AsyncSliceUint8) MapFloat64(f func(el uint8) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapInt

func (s AsyncSliceUint8) MapInt(f func(el uint8) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapInt16

func (s AsyncSliceUint8) MapInt16(f func(el uint8) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapInt32

func (s AsyncSliceUint8) MapInt32(f func(el uint8) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapInt64

func (s AsyncSliceUint8) MapInt64(f func(el uint8) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapInt8

func (s AsyncSliceUint8) MapInt8(f func(el uint8) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapInterface

func (s AsyncSliceUint8) MapInterface(f func(el uint8) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapRune

func (s AsyncSliceUint8) MapRune(f func(el uint8) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapString

func (s AsyncSliceUint8) MapString(f func(el uint8) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapUint

func (s AsyncSliceUint8) MapUint(f func(el uint8) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapUint16

func (s AsyncSliceUint8) MapUint16(f func(el uint8) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapUint32

func (s AsyncSliceUint8) MapUint32(f func(el uint8) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapUint64

func (s AsyncSliceUint8) MapUint64(f func(el uint8) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) MapUint8

func (s AsyncSliceUint8) MapUint8(f func(el uint8) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (AsyncSliceUint8) Reduce

func (s AsyncSliceUint8) Reduce(f func(left uint8, right uint8) uint8) uint8

Reduce reduces slice to a single value with f

type ChannelBool

type ChannelBool struct {
	Data chan bool
}

Channel is a set of operations with channel

func (ChannelBool) All

func (c ChannelBool) All(f func(el bool) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelBool) Any

func (c ChannelBool) Any(f func(el bool) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelBool) ChunkEvery

func (c ChannelBool) ChunkEvery(count int) chan []bool

ChunkEvery returns channel with slices containing count elements each

func (ChannelBool) Count

func (c ChannelBool) Count(el bool) int

Count return count of el occurences in channel.

func (ChannelBool) Drop

func (c ChannelBool) Drop(n int) chan bool

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelBool) Each

func (c ChannelBool) Each(f func(el bool))

Each calls f for every element in the channel

func (ChannelBool) Filter

func (c ChannelBool) Filter(f func(el bool) bool) chan bool

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelBool) MapBool

func (c ChannelBool) MapBool(f func(el bool) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapByte

func (c ChannelBool) MapByte(f func(el bool) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapError

func (c ChannelBool) MapError(f func(el bool) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapFloat32

func (c ChannelBool) MapFloat32(f func(el bool) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapFloat64

func (c ChannelBool) MapFloat64(f func(el bool) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapInt

func (c ChannelBool) MapInt(f func(el bool) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapInt16

func (c ChannelBool) MapInt16(f func(el bool) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapInt32

func (c ChannelBool) MapInt32(f func(el bool) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapInt64

func (c ChannelBool) MapInt64(f func(el bool) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapInt8

func (c ChannelBool) MapInt8(f func(el bool) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapInterface

func (c ChannelBool) MapInterface(f func(el bool) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapRune

func (c ChannelBool) MapRune(f func(el bool) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapString

func (c ChannelBool) MapString(f func(el bool) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapUint

func (c ChannelBool) MapUint(f func(el bool) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapUint16

func (c ChannelBool) MapUint16(f func(el bool) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapUint32

func (c ChannelBool) MapUint32(f func(el bool) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapUint64

func (c ChannelBool) MapUint64(f func(el bool) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) MapUint8

func (c ChannelBool) MapUint8(f func(el bool) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelBool) ReduceBool

func (c ChannelBool) ReduceBool(acc bool, f func(el bool, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceByte

func (c ChannelBool) ReduceByte(acc byte, f func(el bool, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceError

func (c ChannelBool) ReduceError(acc error, f func(el bool, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceFloat32

func (c ChannelBool) ReduceFloat32(acc float32, f func(el bool, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceFloat64

func (c ChannelBool) ReduceFloat64(acc float64, f func(el bool, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceInt

func (c ChannelBool) ReduceInt(acc int, f func(el bool, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceInt16

func (c ChannelBool) ReduceInt16(acc int16, f func(el bool, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceInt32

func (c ChannelBool) ReduceInt32(acc int32, f func(el bool, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceInt64

func (c ChannelBool) ReduceInt64(acc int64, f func(el bool, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceInt8

func (c ChannelBool) ReduceInt8(acc int8, f func(el bool, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceInterface

func (c ChannelBool) ReduceInterface(acc interface{}, f func(el bool, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceRune

func (c ChannelBool) ReduceRune(acc rune, f func(el bool, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceString

func (c ChannelBool) ReduceString(acc string, f func(el bool, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceUint

func (c ChannelBool) ReduceUint(acc uint, f func(el bool, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceUint16

func (c ChannelBool) ReduceUint16(acc uint16, f func(el bool, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceUint32

func (c ChannelBool) ReduceUint32(acc uint32, f func(el bool, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceUint64

func (c ChannelBool) ReduceUint64(acc uint64, f func(el bool, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ReduceUint8

func (c ChannelBool) ReduceUint8(acc uint8, f func(el bool, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelBool) ScanBool

func (c ChannelBool) ScanBool(acc bool, f func(el bool, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanByte

func (c ChannelBool) ScanByte(acc byte, f func(el bool, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanError

func (c ChannelBool) ScanError(acc error, f func(el bool, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanFloat32

func (c ChannelBool) ScanFloat32(acc float32, f func(el bool, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanFloat64

func (c ChannelBool) ScanFloat64(acc float64, f func(el bool, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanInt

func (c ChannelBool) ScanInt(acc int, f func(el bool, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanInt16

func (c ChannelBool) ScanInt16(acc int16, f func(el bool, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanInt32

func (c ChannelBool) ScanInt32(acc int32, f func(el bool, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanInt64

func (c ChannelBool) ScanInt64(acc int64, f func(el bool, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanInt8

func (c ChannelBool) ScanInt8(acc int8, f func(el bool, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanInterface

func (c ChannelBool) ScanInterface(acc interface{}, f func(el bool, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanRune

func (c ChannelBool) ScanRune(acc rune, f func(el bool, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanString

func (c ChannelBool) ScanString(acc string, f func(el bool, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanUint

func (c ChannelBool) ScanUint(acc uint, f func(el bool, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanUint16

func (c ChannelBool) ScanUint16(acc uint16, f func(el bool, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanUint32

func (c ChannelBool) ScanUint32(acc uint32, f func(el bool, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanUint64

func (c ChannelBool) ScanUint64(acc uint64, f func(el bool, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelBool) ScanUint8

func (c ChannelBool) ScanUint8(acc uint8, f func(el bool, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelBool) Take

func (c ChannelBool) Take(count int) chan bool

Take takes first count elements from the channel.

func (ChannelBool) Tee

func (c ChannelBool) Tee(count int) []chan bool

Tee returns 2 channels with elements from the input channel

func (ChannelBool) ToSlice

func (c ChannelBool) ToSlice() []bool

ToSlice returns slice with all elements from channel.

type ChannelByte

type ChannelByte struct {
	Data chan byte
}

Channel is a set of operations with channel

func (ChannelByte) All

func (c ChannelByte) All(f func(el byte) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelByte) Any

func (c ChannelByte) Any(f func(el byte) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelByte) ChunkEvery

func (c ChannelByte) ChunkEvery(count int) chan []byte

ChunkEvery returns channel with slices containing count elements each

func (ChannelByte) Count

func (c ChannelByte) Count(el byte) int

Count return count of el occurences in channel.

func (ChannelByte) Drop

func (c ChannelByte) Drop(n int) chan byte

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelByte) Each

func (c ChannelByte) Each(f func(el byte))

Each calls f for every element in the channel

func (ChannelByte) Filter

func (c ChannelByte) Filter(f func(el byte) bool) chan byte

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelByte) MapBool

func (c ChannelByte) MapBool(f func(el byte) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapByte

func (c ChannelByte) MapByte(f func(el byte) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapError

func (c ChannelByte) MapError(f func(el byte) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapFloat32

func (c ChannelByte) MapFloat32(f func(el byte) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapFloat64

func (c ChannelByte) MapFloat64(f func(el byte) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapInt

func (c ChannelByte) MapInt(f func(el byte) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapInt16

func (c ChannelByte) MapInt16(f func(el byte) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapInt32

func (c ChannelByte) MapInt32(f func(el byte) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapInt64

func (c ChannelByte) MapInt64(f func(el byte) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapInt8

func (c ChannelByte) MapInt8(f func(el byte) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapInterface

func (c ChannelByte) MapInterface(f func(el byte) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapRune

func (c ChannelByte) MapRune(f func(el byte) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapString

func (c ChannelByte) MapString(f func(el byte) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapUint

func (c ChannelByte) MapUint(f func(el byte) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapUint16

func (c ChannelByte) MapUint16(f func(el byte) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapUint32

func (c ChannelByte) MapUint32(f func(el byte) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapUint64

func (c ChannelByte) MapUint64(f func(el byte) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) MapUint8

func (c ChannelByte) MapUint8(f func(el byte) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelByte) Max

func (c ChannelByte) Max() (byte, error)

Max returns the maximal element from channel

func (ChannelByte) Min

func (c ChannelByte) Min() (byte, error)

Min returns the minimal element from channel

func (ChannelByte) ReduceBool

func (c ChannelByte) ReduceBool(acc bool, f func(el byte, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceByte

func (c ChannelByte) ReduceByte(acc byte, f func(el byte, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceError

func (c ChannelByte) ReduceError(acc error, f func(el byte, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceFloat32

func (c ChannelByte) ReduceFloat32(acc float32, f func(el byte, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceFloat64

func (c ChannelByte) ReduceFloat64(acc float64, f func(el byte, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceInt

func (c ChannelByte) ReduceInt(acc int, f func(el byte, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceInt16

func (c ChannelByte) ReduceInt16(acc int16, f func(el byte, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceInt32

func (c ChannelByte) ReduceInt32(acc int32, f func(el byte, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceInt64

func (c ChannelByte) ReduceInt64(acc int64, f func(el byte, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceInt8

func (c ChannelByte) ReduceInt8(acc int8, f func(el byte, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceInterface

func (c ChannelByte) ReduceInterface(acc interface{}, f func(el byte, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceRune

func (c ChannelByte) ReduceRune(acc rune, f func(el byte, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceString

func (c ChannelByte) ReduceString(acc string, f func(el byte, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceUint

func (c ChannelByte) ReduceUint(acc uint, f func(el byte, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceUint16

func (c ChannelByte) ReduceUint16(acc uint16, f func(el byte, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceUint32

func (c ChannelByte) ReduceUint32(acc uint32, f func(el byte, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceUint64

func (c ChannelByte) ReduceUint64(acc uint64, f func(el byte, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ReduceUint8

func (c ChannelByte) ReduceUint8(acc uint8, f func(el byte, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelByte) ScanBool

func (c ChannelByte) ScanBool(acc bool, f func(el byte, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanByte

func (c ChannelByte) ScanByte(acc byte, f func(el byte, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanError

func (c ChannelByte) ScanError(acc error, f func(el byte, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanFloat32

func (c ChannelByte) ScanFloat32(acc float32, f func(el byte, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanFloat64

func (c ChannelByte) ScanFloat64(acc float64, f func(el byte, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanInt

func (c ChannelByte) ScanInt(acc int, f func(el byte, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanInt16

func (c ChannelByte) ScanInt16(acc int16, f func(el byte, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanInt32

func (c ChannelByte) ScanInt32(acc int32, f func(el byte, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanInt64

func (c ChannelByte) ScanInt64(acc int64, f func(el byte, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanInt8

func (c ChannelByte) ScanInt8(acc int8, f func(el byte, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanInterface

func (c ChannelByte) ScanInterface(acc interface{}, f func(el byte, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanRune

func (c ChannelByte) ScanRune(acc rune, f func(el byte, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanString

func (c ChannelByte) ScanString(acc string, f func(el byte, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanUint

func (c ChannelByte) ScanUint(acc uint, f func(el byte, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanUint16

func (c ChannelByte) ScanUint16(acc uint16, f func(el byte, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanUint32

func (c ChannelByte) ScanUint32(acc uint32, f func(el byte, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanUint64

func (c ChannelByte) ScanUint64(acc uint64, f func(el byte, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelByte) ScanUint8

func (c ChannelByte) ScanUint8(acc uint8, f func(el byte, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelByte) Sum

func (c ChannelByte) Sum() byte

Sum returns sum of all elements from channel

func (ChannelByte) Take

func (c ChannelByte) Take(count int) chan byte

Take takes first count elements from the channel.

func (ChannelByte) Tee

func (c ChannelByte) Tee(count int) []chan byte

Tee returns 2 channels with elements from the input channel

func (ChannelByte) ToSlice

func (c ChannelByte) ToSlice() []byte

ToSlice returns slice with all elements from channel.

type ChannelError

type ChannelError struct {
	Data chan error
}

Channel is a set of operations with channel

func (ChannelError) All

func (c ChannelError) All(f func(el error) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelError) Any

func (c ChannelError) Any(f func(el error) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelError) ChunkEvery

func (c ChannelError) ChunkEvery(count int) chan []error

ChunkEvery returns channel with slices containing count elements each

func (ChannelError) Count

func (c ChannelError) Count(el error) int

Count return count of el occurences in channel.

func (ChannelError) Drop

func (c ChannelError) Drop(n int) chan error

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelError) Each

func (c ChannelError) Each(f func(el error))

Each calls f for every element in the channel

func (ChannelError) Filter

func (c ChannelError) Filter(f func(el error) bool) chan error

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelError) MapBool

func (c ChannelError) MapBool(f func(el error) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapByte

func (c ChannelError) MapByte(f func(el error) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapError

func (c ChannelError) MapError(f func(el error) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapFloat32

func (c ChannelError) MapFloat32(f func(el error) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapFloat64

func (c ChannelError) MapFloat64(f func(el error) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapInt

func (c ChannelError) MapInt(f func(el error) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapInt16

func (c ChannelError) MapInt16(f func(el error) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapInt32

func (c ChannelError) MapInt32(f func(el error) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapInt64

func (c ChannelError) MapInt64(f func(el error) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapInt8

func (c ChannelError) MapInt8(f func(el error) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapInterface

func (c ChannelError) MapInterface(f func(el error) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapRune

func (c ChannelError) MapRune(f func(el error) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapString

func (c ChannelError) MapString(f func(el error) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapUint

func (c ChannelError) MapUint(f func(el error) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapUint16

func (c ChannelError) MapUint16(f func(el error) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapUint32

func (c ChannelError) MapUint32(f func(el error) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapUint64

func (c ChannelError) MapUint64(f func(el error) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelError) MapUint8

func (c ChannelError) MapUint8(f func(el error) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelError) ReduceBool

func (c ChannelError) ReduceBool(acc bool, f func(el error, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceByte

func (c ChannelError) ReduceByte(acc byte, f func(el error, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceError

func (c ChannelError) ReduceError(acc error, f func(el error, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceFloat32

func (c ChannelError) ReduceFloat32(acc float32, f func(el error, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceFloat64

func (c ChannelError) ReduceFloat64(acc float64, f func(el error, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceInt

func (c ChannelError) ReduceInt(acc int, f func(el error, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceInt16

func (c ChannelError) ReduceInt16(acc int16, f func(el error, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceInt32

func (c ChannelError) ReduceInt32(acc int32, f func(el error, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceInt64

func (c ChannelError) ReduceInt64(acc int64, f func(el error, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceInt8

func (c ChannelError) ReduceInt8(acc int8, f func(el error, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceInterface

func (c ChannelError) ReduceInterface(acc interface{}, f func(el error, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceRune

func (c ChannelError) ReduceRune(acc rune, f func(el error, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceString

func (c ChannelError) ReduceString(acc string, f func(el error, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceUint

func (c ChannelError) ReduceUint(acc uint, f func(el error, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceUint16

func (c ChannelError) ReduceUint16(acc uint16, f func(el error, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceUint32

func (c ChannelError) ReduceUint32(acc uint32, f func(el error, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceUint64

func (c ChannelError) ReduceUint64(acc uint64, f func(el error, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ReduceUint8

func (c ChannelError) ReduceUint8(acc uint8, f func(el error, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelError) ScanBool

func (c ChannelError) ScanBool(acc bool, f func(el error, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanByte

func (c ChannelError) ScanByte(acc byte, f func(el error, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanError

func (c ChannelError) ScanError(acc error, f func(el error, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanFloat32

func (c ChannelError) ScanFloat32(acc float32, f func(el error, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanFloat64

func (c ChannelError) ScanFloat64(acc float64, f func(el error, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanInt

func (c ChannelError) ScanInt(acc int, f func(el error, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanInt16

func (c ChannelError) ScanInt16(acc int16, f func(el error, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanInt32

func (c ChannelError) ScanInt32(acc int32, f func(el error, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanInt64

func (c ChannelError) ScanInt64(acc int64, f func(el error, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanInt8

func (c ChannelError) ScanInt8(acc int8, f func(el error, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanInterface

func (c ChannelError) ScanInterface(acc interface{}, f func(el error, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanRune

func (c ChannelError) ScanRune(acc rune, f func(el error, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanString

func (c ChannelError) ScanString(acc string, f func(el error, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanUint

func (c ChannelError) ScanUint(acc uint, f func(el error, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanUint16

func (c ChannelError) ScanUint16(acc uint16, f func(el error, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanUint32

func (c ChannelError) ScanUint32(acc uint32, f func(el error, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanUint64

func (c ChannelError) ScanUint64(acc uint64, f func(el error, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelError) ScanUint8

func (c ChannelError) ScanUint8(acc uint8, f func(el error, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelError) Take

func (c ChannelError) Take(count int) chan error

Take takes first count elements from the channel.

func (ChannelError) Tee

func (c ChannelError) Tee(count int) []chan error

Tee returns 2 channels with elements from the input channel

func (ChannelError) ToSlice

func (c ChannelError) ToSlice() []error

ToSlice returns slice with all elements from channel.

type ChannelFloat32

type ChannelFloat32 struct {
	Data chan float32
}

Channel is a set of operations with channel

func (ChannelFloat32) All

func (c ChannelFloat32) All(f func(el float32) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelFloat32) Any

func (c ChannelFloat32) Any(f func(el float32) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelFloat32) ChunkEvery

func (c ChannelFloat32) ChunkEvery(count int) chan []float32

ChunkEvery returns channel with slices containing count elements each

func (ChannelFloat32) Count

func (c ChannelFloat32) Count(el float32) int

Count return count of el occurences in channel.

func (ChannelFloat32) Drop

func (c ChannelFloat32) Drop(n int) chan float32

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelFloat32) Each

func (c ChannelFloat32) Each(f func(el float32))

Each calls f for every element in the channel

func (ChannelFloat32) Filter

func (c ChannelFloat32) Filter(f func(el float32) bool) chan float32

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelFloat32) MapBool

func (c ChannelFloat32) MapBool(f func(el float32) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapByte

func (c ChannelFloat32) MapByte(f func(el float32) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapError

func (c ChannelFloat32) MapError(f func(el float32) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapFloat32

func (c ChannelFloat32) MapFloat32(f func(el float32) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapFloat64

func (c ChannelFloat32) MapFloat64(f func(el float32) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapInt

func (c ChannelFloat32) MapInt(f func(el float32) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapInt16

func (c ChannelFloat32) MapInt16(f func(el float32) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapInt32

func (c ChannelFloat32) MapInt32(f func(el float32) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapInt64

func (c ChannelFloat32) MapInt64(f func(el float32) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapInt8

func (c ChannelFloat32) MapInt8(f func(el float32) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapInterface

func (c ChannelFloat32) MapInterface(f func(el float32) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapRune

func (c ChannelFloat32) MapRune(f func(el float32) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapString

func (c ChannelFloat32) MapString(f func(el float32) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapUint

func (c ChannelFloat32) MapUint(f func(el float32) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapUint16

func (c ChannelFloat32) MapUint16(f func(el float32) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapUint32

func (c ChannelFloat32) MapUint32(f func(el float32) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapUint64

func (c ChannelFloat32) MapUint64(f func(el float32) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) MapUint8

func (c ChannelFloat32) MapUint8(f func(el float32) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat32) Max

func (c ChannelFloat32) Max() (float32, error)

Max returns the maximal element from channel

func (ChannelFloat32) Min

func (c ChannelFloat32) Min() (float32, error)

Min returns the minimal element from channel

func (ChannelFloat32) ReduceBool

func (c ChannelFloat32) ReduceBool(acc bool, f func(el float32, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceByte

func (c ChannelFloat32) ReduceByte(acc byte, f func(el float32, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceError

func (c ChannelFloat32) ReduceError(acc error, f func(el float32, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceFloat32

func (c ChannelFloat32) ReduceFloat32(acc float32, f func(el float32, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceFloat64

func (c ChannelFloat32) ReduceFloat64(acc float64, f func(el float32, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceInt

func (c ChannelFloat32) ReduceInt(acc int, f func(el float32, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceInt16

func (c ChannelFloat32) ReduceInt16(acc int16, f func(el float32, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceInt32

func (c ChannelFloat32) ReduceInt32(acc int32, f func(el float32, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceInt64

func (c ChannelFloat32) ReduceInt64(acc int64, f func(el float32, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceInt8

func (c ChannelFloat32) ReduceInt8(acc int8, f func(el float32, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceInterface

func (c ChannelFloat32) ReduceInterface(acc interface{}, f func(el float32, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceRune

func (c ChannelFloat32) ReduceRune(acc rune, f func(el float32, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceString

func (c ChannelFloat32) ReduceString(acc string, f func(el float32, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceUint

func (c ChannelFloat32) ReduceUint(acc uint, f func(el float32, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceUint16

func (c ChannelFloat32) ReduceUint16(acc uint16, f func(el float32, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceUint32

func (c ChannelFloat32) ReduceUint32(acc uint32, f func(el float32, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceUint64

func (c ChannelFloat32) ReduceUint64(acc uint64, f func(el float32, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ReduceUint8

func (c ChannelFloat32) ReduceUint8(acc uint8, f func(el float32, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat32) ScanBool

func (c ChannelFloat32) ScanBool(acc bool, f func(el float32, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanByte

func (c ChannelFloat32) ScanByte(acc byte, f func(el float32, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanError

func (c ChannelFloat32) ScanError(acc error, f func(el float32, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanFloat32

func (c ChannelFloat32) ScanFloat32(acc float32, f func(el float32, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanFloat64

func (c ChannelFloat32) ScanFloat64(acc float64, f func(el float32, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanInt

func (c ChannelFloat32) ScanInt(acc int, f func(el float32, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanInt16

func (c ChannelFloat32) ScanInt16(acc int16, f func(el float32, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanInt32

func (c ChannelFloat32) ScanInt32(acc int32, f func(el float32, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanInt64

func (c ChannelFloat32) ScanInt64(acc int64, f func(el float32, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanInt8

func (c ChannelFloat32) ScanInt8(acc int8, f func(el float32, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanInterface

func (c ChannelFloat32) ScanInterface(acc interface{}, f func(el float32, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanRune

func (c ChannelFloat32) ScanRune(acc rune, f func(el float32, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanString

func (c ChannelFloat32) ScanString(acc string, f func(el float32, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanUint

func (c ChannelFloat32) ScanUint(acc uint, f func(el float32, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanUint16

func (c ChannelFloat32) ScanUint16(acc uint16, f func(el float32, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanUint32

func (c ChannelFloat32) ScanUint32(acc uint32, f func(el float32, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanUint64

func (c ChannelFloat32) ScanUint64(acc uint64, f func(el float32, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) ScanUint8

func (c ChannelFloat32) ScanUint8(acc uint8, f func(el float32, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelFloat32) Sum

func (c ChannelFloat32) Sum() float32

Sum returns sum of all elements from channel

func (ChannelFloat32) Take

func (c ChannelFloat32) Take(count int) chan float32

Take takes first count elements from the channel.

func (ChannelFloat32) Tee

func (c ChannelFloat32) Tee(count int) []chan float32

Tee returns 2 channels with elements from the input channel

func (ChannelFloat32) ToSlice

func (c ChannelFloat32) ToSlice() []float32

ToSlice returns slice with all elements from channel.

type ChannelFloat64

type ChannelFloat64 struct {
	Data chan float64
}

Channel is a set of operations with channel

func (ChannelFloat64) All

func (c ChannelFloat64) All(f func(el float64) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelFloat64) Any

func (c ChannelFloat64) Any(f func(el float64) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelFloat64) ChunkEvery

func (c ChannelFloat64) ChunkEvery(count int) chan []float64

ChunkEvery returns channel with slices containing count elements each

func (ChannelFloat64) Count

func (c ChannelFloat64) Count(el float64) int

Count return count of el occurences in channel.

func (ChannelFloat64) Drop

func (c ChannelFloat64) Drop(n int) chan float64

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelFloat64) Each

func (c ChannelFloat64) Each(f func(el float64))

Each calls f for every element in the channel

func (ChannelFloat64) Filter

func (c ChannelFloat64) Filter(f func(el float64) bool) chan float64

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelFloat64) MapBool

func (c ChannelFloat64) MapBool(f func(el float64) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapByte

func (c ChannelFloat64) MapByte(f func(el float64) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapError

func (c ChannelFloat64) MapError(f func(el float64) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapFloat32

func (c ChannelFloat64) MapFloat32(f func(el float64) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapFloat64

func (c ChannelFloat64) MapFloat64(f func(el float64) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapInt

func (c ChannelFloat64) MapInt(f func(el float64) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapInt16

func (c ChannelFloat64) MapInt16(f func(el float64) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapInt32

func (c ChannelFloat64) MapInt32(f func(el float64) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapInt64

func (c ChannelFloat64) MapInt64(f func(el float64) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapInt8

func (c ChannelFloat64) MapInt8(f func(el float64) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapInterface

func (c ChannelFloat64) MapInterface(f func(el float64) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapRune

func (c ChannelFloat64) MapRune(f func(el float64) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapString

func (c ChannelFloat64) MapString(f func(el float64) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapUint

func (c ChannelFloat64) MapUint(f func(el float64) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapUint16

func (c ChannelFloat64) MapUint16(f func(el float64) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapUint32

func (c ChannelFloat64) MapUint32(f func(el float64) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapUint64

func (c ChannelFloat64) MapUint64(f func(el float64) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) MapUint8

func (c ChannelFloat64) MapUint8(f func(el float64) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelFloat64) Max

func (c ChannelFloat64) Max() (float64, error)

Max returns the maximal element from channel

func (ChannelFloat64) Min

func (c ChannelFloat64) Min() (float64, error)

Min returns the minimal element from channel

func (ChannelFloat64) ReduceBool

func (c ChannelFloat64) ReduceBool(acc bool, f func(el float64, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceByte

func (c ChannelFloat64) ReduceByte(acc byte, f func(el float64, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceError

func (c ChannelFloat64) ReduceError(acc error, f func(el float64, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceFloat32

func (c ChannelFloat64) ReduceFloat32(acc float32, f func(el float64, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceFloat64

func (c ChannelFloat64) ReduceFloat64(acc float64, f func(el float64, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceInt

func (c ChannelFloat64) ReduceInt(acc int, f func(el float64, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceInt16

func (c ChannelFloat64) ReduceInt16(acc int16, f func(el float64, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceInt32

func (c ChannelFloat64) ReduceInt32(acc int32, f func(el float64, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceInt64

func (c ChannelFloat64) ReduceInt64(acc int64, f func(el float64, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceInt8

func (c ChannelFloat64) ReduceInt8(acc int8, f func(el float64, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceInterface

func (c ChannelFloat64) ReduceInterface(acc interface{}, f func(el float64, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceRune

func (c ChannelFloat64) ReduceRune(acc rune, f func(el float64, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceString

func (c ChannelFloat64) ReduceString(acc string, f func(el float64, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceUint

func (c ChannelFloat64) ReduceUint(acc uint, f func(el float64, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceUint16

func (c ChannelFloat64) ReduceUint16(acc uint16, f func(el float64, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceUint32

func (c ChannelFloat64) ReduceUint32(acc uint32, f func(el float64, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceUint64

func (c ChannelFloat64) ReduceUint64(acc uint64, f func(el float64, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ReduceUint8

func (c ChannelFloat64) ReduceUint8(acc uint8, f func(el float64, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelFloat64) ScanBool

func (c ChannelFloat64) ScanBool(acc bool, f func(el float64, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanByte

func (c ChannelFloat64) ScanByte(acc byte, f func(el float64, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanError

func (c ChannelFloat64) ScanError(acc error, f func(el float64, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanFloat32

func (c ChannelFloat64) ScanFloat32(acc float32, f func(el float64, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanFloat64

func (c ChannelFloat64) ScanFloat64(acc float64, f func(el float64, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanInt

func (c ChannelFloat64) ScanInt(acc int, f func(el float64, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanInt16

func (c ChannelFloat64) ScanInt16(acc int16, f func(el float64, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanInt32

func (c ChannelFloat64) ScanInt32(acc int32, f func(el float64, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanInt64

func (c ChannelFloat64) ScanInt64(acc int64, f func(el float64, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanInt8

func (c ChannelFloat64) ScanInt8(acc int8, f func(el float64, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanInterface

func (c ChannelFloat64) ScanInterface(acc interface{}, f func(el float64, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanRune

func (c ChannelFloat64) ScanRune(acc rune, f func(el float64, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanString

func (c ChannelFloat64) ScanString(acc string, f func(el float64, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanUint

func (c ChannelFloat64) ScanUint(acc uint, f func(el float64, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanUint16

func (c ChannelFloat64) ScanUint16(acc uint16, f func(el float64, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanUint32

func (c ChannelFloat64) ScanUint32(acc uint32, f func(el float64, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanUint64

func (c ChannelFloat64) ScanUint64(acc uint64, f func(el float64, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) ScanUint8

func (c ChannelFloat64) ScanUint8(acc uint8, f func(el float64, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelFloat64) Sum

func (c ChannelFloat64) Sum() float64

Sum returns sum of all elements from channel

func (ChannelFloat64) Take

func (c ChannelFloat64) Take(count int) chan float64

Take takes first count elements from the channel.

func (ChannelFloat64) Tee

func (c ChannelFloat64) Tee(count int) []chan float64

Tee returns 2 channels with elements from the input channel

func (ChannelFloat64) ToSlice

func (c ChannelFloat64) ToSlice() []float64

ToSlice returns slice with all elements from channel.

type ChannelInt

type ChannelInt struct {
	Data chan int
}

Channel is a set of operations with channel

func (ChannelInt) All

func (c ChannelInt) All(f func(el int) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelInt) Any

func (c ChannelInt) Any(f func(el int) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelInt) ChunkEvery

func (c ChannelInt) ChunkEvery(count int) chan []int

ChunkEvery returns channel with slices containing count elements each

func (ChannelInt) Count

func (c ChannelInt) Count(el int) int

Count return count of el occurences in channel.

func (ChannelInt) Drop

func (c ChannelInt) Drop(n int) chan int

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelInt) Each

func (c ChannelInt) Each(f func(el int))

Each calls f for every element in the channel

func (ChannelInt) Filter

func (c ChannelInt) Filter(f func(el int) bool) chan int

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelInt) MapBool

func (c ChannelInt) MapBool(f func(el int) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapByte

func (c ChannelInt) MapByte(f func(el int) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapError

func (c ChannelInt) MapError(f func(el int) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapFloat32

func (c ChannelInt) MapFloat32(f func(el int) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapFloat64

func (c ChannelInt) MapFloat64(f func(el int) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapInt

func (c ChannelInt) MapInt(f func(el int) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapInt16

func (c ChannelInt) MapInt16(f func(el int) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapInt32

func (c ChannelInt) MapInt32(f func(el int) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapInt64

func (c ChannelInt) MapInt64(f func(el int) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapInt8

func (c ChannelInt) MapInt8(f func(el int) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapInterface

func (c ChannelInt) MapInterface(f func(el int) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapRune

func (c ChannelInt) MapRune(f func(el int) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapString

func (c ChannelInt) MapString(f func(el int) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapUint

func (c ChannelInt) MapUint(f func(el int) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapUint16

func (c ChannelInt) MapUint16(f func(el int) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapUint32

func (c ChannelInt) MapUint32(f func(el int) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapUint64

func (c ChannelInt) MapUint64(f func(el int) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) MapUint8

func (c ChannelInt) MapUint8(f func(el int) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt) Max

func (c ChannelInt) Max() (int, error)

Max returns the maximal element from channel

func (ChannelInt) Min

func (c ChannelInt) Min() (int, error)

Min returns the minimal element from channel

func (ChannelInt) ReduceBool

func (c ChannelInt) ReduceBool(acc bool, f func(el int, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceByte

func (c ChannelInt) ReduceByte(acc byte, f func(el int, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceError

func (c ChannelInt) ReduceError(acc error, f func(el int, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceFloat32

func (c ChannelInt) ReduceFloat32(acc float32, f func(el int, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceFloat64

func (c ChannelInt) ReduceFloat64(acc float64, f func(el int, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceInt

func (c ChannelInt) ReduceInt(acc int, f func(el int, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceInt16

func (c ChannelInt) ReduceInt16(acc int16, f func(el int, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceInt32

func (c ChannelInt) ReduceInt32(acc int32, f func(el int, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceInt64

func (c ChannelInt) ReduceInt64(acc int64, f func(el int, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceInt8

func (c ChannelInt) ReduceInt8(acc int8, f func(el int, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceInterface

func (c ChannelInt) ReduceInterface(acc interface{}, f func(el int, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceRune

func (c ChannelInt) ReduceRune(acc rune, f func(el int, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceString

func (c ChannelInt) ReduceString(acc string, f func(el int, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceUint

func (c ChannelInt) ReduceUint(acc uint, f func(el int, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceUint16

func (c ChannelInt) ReduceUint16(acc uint16, f func(el int, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceUint32

func (c ChannelInt) ReduceUint32(acc uint32, f func(el int, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceUint64

func (c ChannelInt) ReduceUint64(acc uint64, f func(el int, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ReduceUint8

func (c ChannelInt) ReduceUint8(acc uint8, f func(el int, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt) ScanBool

func (c ChannelInt) ScanBool(acc bool, f func(el int, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanByte

func (c ChannelInt) ScanByte(acc byte, f func(el int, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanError

func (c ChannelInt) ScanError(acc error, f func(el int, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanFloat32

func (c ChannelInt) ScanFloat32(acc float32, f func(el int, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanFloat64

func (c ChannelInt) ScanFloat64(acc float64, f func(el int, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanInt

func (c ChannelInt) ScanInt(acc int, f func(el int, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanInt16

func (c ChannelInt) ScanInt16(acc int16, f func(el int, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanInt32

func (c ChannelInt) ScanInt32(acc int32, f func(el int, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanInt64

func (c ChannelInt) ScanInt64(acc int64, f func(el int, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanInt8

func (c ChannelInt) ScanInt8(acc int8, f func(el int, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanInterface

func (c ChannelInt) ScanInterface(acc interface{}, f func(el int, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanRune

func (c ChannelInt) ScanRune(acc rune, f func(el int, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanString

func (c ChannelInt) ScanString(acc string, f func(el int, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanUint

func (c ChannelInt) ScanUint(acc uint, f func(el int, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanUint16

func (c ChannelInt) ScanUint16(acc uint16, f func(el int, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanUint32

func (c ChannelInt) ScanUint32(acc uint32, f func(el int, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanUint64

func (c ChannelInt) ScanUint64(acc uint64, f func(el int, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelInt) ScanUint8

func (c ChannelInt) ScanUint8(acc uint8, f func(el int, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelInt) Sum

func (c ChannelInt) Sum() int

Sum returns sum of all elements from channel

func (ChannelInt) Take

func (c ChannelInt) Take(count int) chan int

Take takes first count elements from the channel.

func (ChannelInt) Tee

func (c ChannelInt) Tee(count int) []chan int

Tee returns 2 channels with elements from the input channel

func (ChannelInt) ToSlice

func (c ChannelInt) ToSlice() []int

ToSlice returns slice with all elements from channel.

type ChannelInt16

type ChannelInt16 struct {
	Data chan int16
}

Channel is a set of operations with channel

func (ChannelInt16) All

func (c ChannelInt16) All(f func(el int16) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelInt16) Any

func (c ChannelInt16) Any(f func(el int16) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelInt16) ChunkEvery

func (c ChannelInt16) ChunkEvery(count int) chan []int16

ChunkEvery returns channel with slices containing count elements each

func (ChannelInt16) Count

func (c ChannelInt16) Count(el int16) int

Count return count of el occurences in channel.

func (ChannelInt16) Drop

func (c ChannelInt16) Drop(n int) chan int16

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelInt16) Each

func (c ChannelInt16) Each(f func(el int16))

Each calls f for every element in the channel

func (ChannelInt16) Filter

func (c ChannelInt16) Filter(f func(el int16) bool) chan int16

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelInt16) MapBool

func (c ChannelInt16) MapBool(f func(el int16) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapByte

func (c ChannelInt16) MapByte(f func(el int16) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapError

func (c ChannelInt16) MapError(f func(el int16) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapFloat32

func (c ChannelInt16) MapFloat32(f func(el int16) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapFloat64

func (c ChannelInt16) MapFloat64(f func(el int16) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapInt

func (c ChannelInt16) MapInt(f func(el int16) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapInt16

func (c ChannelInt16) MapInt16(f func(el int16) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapInt32

func (c ChannelInt16) MapInt32(f func(el int16) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapInt64

func (c ChannelInt16) MapInt64(f func(el int16) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapInt8

func (c ChannelInt16) MapInt8(f func(el int16) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapInterface

func (c ChannelInt16) MapInterface(f func(el int16) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapRune

func (c ChannelInt16) MapRune(f func(el int16) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapString

func (c ChannelInt16) MapString(f func(el int16) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapUint

func (c ChannelInt16) MapUint(f func(el int16) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapUint16

func (c ChannelInt16) MapUint16(f func(el int16) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapUint32

func (c ChannelInt16) MapUint32(f func(el int16) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapUint64

func (c ChannelInt16) MapUint64(f func(el int16) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) MapUint8

func (c ChannelInt16) MapUint8(f func(el int16) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt16) Max

func (c ChannelInt16) Max() (int16, error)

Max returns the maximal element from channel

func (ChannelInt16) Min

func (c ChannelInt16) Min() (int16, error)

Min returns the minimal element from channel

func (ChannelInt16) ReduceBool

func (c ChannelInt16) ReduceBool(acc bool, f func(el int16, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceByte

func (c ChannelInt16) ReduceByte(acc byte, f func(el int16, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceError

func (c ChannelInt16) ReduceError(acc error, f func(el int16, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceFloat32

func (c ChannelInt16) ReduceFloat32(acc float32, f func(el int16, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceFloat64

func (c ChannelInt16) ReduceFloat64(acc float64, f func(el int16, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceInt

func (c ChannelInt16) ReduceInt(acc int, f func(el int16, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceInt16

func (c ChannelInt16) ReduceInt16(acc int16, f func(el int16, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceInt32

func (c ChannelInt16) ReduceInt32(acc int32, f func(el int16, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceInt64

func (c ChannelInt16) ReduceInt64(acc int64, f func(el int16, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceInt8

func (c ChannelInt16) ReduceInt8(acc int8, f func(el int16, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceInterface

func (c ChannelInt16) ReduceInterface(acc interface{}, f func(el int16, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceRune

func (c ChannelInt16) ReduceRune(acc rune, f func(el int16, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceString

func (c ChannelInt16) ReduceString(acc string, f func(el int16, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceUint

func (c ChannelInt16) ReduceUint(acc uint, f func(el int16, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceUint16

func (c ChannelInt16) ReduceUint16(acc uint16, f func(el int16, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceUint32

func (c ChannelInt16) ReduceUint32(acc uint32, f func(el int16, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceUint64

func (c ChannelInt16) ReduceUint64(acc uint64, f func(el int16, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ReduceUint8

func (c ChannelInt16) ReduceUint8(acc uint8, f func(el int16, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt16) ScanBool

func (c ChannelInt16) ScanBool(acc bool, f func(el int16, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanByte

func (c ChannelInt16) ScanByte(acc byte, f func(el int16, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanError

func (c ChannelInt16) ScanError(acc error, f func(el int16, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanFloat32

func (c ChannelInt16) ScanFloat32(acc float32, f func(el int16, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanFloat64

func (c ChannelInt16) ScanFloat64(acc float64, f func(el int16, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanInt

func (c ChannelInt16) ScanInt(acc int, f func(el int16, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanInt16

func (c ChannelInt16) ScanInt16(acc int16, f func(el int16, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanInt32

func (c ChannelInt16) ScanInt32(acc int32, f func(el int16, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanInt64

func (c ChannelInt16) ScanInt64(acc int64, f func(el int16, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanInt8

func (c ChannelInt16) ScanInt8(acc int8, f func(el int16, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanInterface

func (c ChannelInt16) ScanInterface(acc interface{}, f func(el int16, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanRune

func (c ChannelInt16) ScanRune(acc rune, f func(el int16, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanString

func (c ChannelInt16) ScanString(acc string, f func(el int16, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanUint

func (c ChannelInt16) ScanUint(acc uint, f func(el int16, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanUint16

func (c ChannelInt16) ScanUint16(acc uint16, f func(el int16, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanUint32

func (c ChannelInt16) ScanUint32(acc uint32, f func(el int16, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanUint64

func (c ChannelInt16) ScanUint64(acc uint64, f func(el int16, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) ScanUint8

func (c ChannelInt16) ScanUint8(acc uint8, f func(el int16, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelInt16) Sum

func (c ChannelInt16) Sum() int16

Sum returns sum of all elements from channel

func (ChannelInt16) Take

func (c ChannelInt16) Take(count int) chan int16

Take takes first count elements from the channel.

func (ChannelInt16) Tee

func (c ChannelInt16) Tee(count int) []chan int16

Tee returns 2 channels with elements from the input channel

func (ChannelInt16) ToSlice

func (c ChannelInt16) ToSlice() []int16

ToSlice returns slice with all elements from channel.

type ChannelInt32

type ChannelInt32 struct {
	Data chan int32
}

Channel is a set of operations with channel

func (ChannelInt32) All

func (c ChannelInt32) All(f func(el int32) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelInt32) Any

func (c ChannelInt32) Any(f func(el int32) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelInt32) ChunkEvery

func (c ChannelInt32) ChunkEvery(count int) chan []int32

ChunkEvery returns channel with slices containing count elements each

func (ChannelInt32) Count

func (c ChannelInt32) Count(el int32) int

Count return count of el occurences in channel.

func (ChannelInt32) Drop

func (c ChannelInt32) Drop(n int) chan int32

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelInt32) Each

func (c ChannelInt32) Each(f func(el int32))

Each calls f for every element in the channel

func (ChannelInt32) Filter

func (c ChannelInt32) Filter(f func(el int32) bool) chan int32

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelInt32) MapBool

func (c ChannelInt32) MapBool(f func(el int32) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapByte

func (c ChannelInt32) MapByte(f func(el int32) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapError

func (c ChannelInt32) MapError(f func(el int32) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapFloat32

func (c ChannelInt32) MapFloat32(f func(el int32) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapFloat64

func (c ChannelInt32) MapFloat64(f func(el int32) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapInt

func (c ChannelInt32) MapInt(f func(el int32) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapInt16

func (c ChannelInt32) MapInt16(f func(el int32) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapInt32

func (c ChannelInt32) MapInt32(f func(el int32) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapInt64

func (c ChannelInt32) MapInt64(f func(el int32) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapInt8

func (c ChannelInt32) MapInt8(f func(el int32) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapInterface

func (c ChannelInt32) MapInterface(f func(el int32) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapRune

func (c ChannelInt32) MapRune(f func(el int32) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapString

func (c ChannelInt32) MapString(f func(el int32) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapUint

func (c ChannelInt32) MapUint(f func(el int32) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapUint16

func (c ChannelInt32) MapUint16(f func(el int32) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapUint32

func (c ChannelInt32) MapUint32(f func(el int32) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapUint64

func (c ChannelInt32) MapUint64(f func(el int32) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) MapUint8

func (c ChannelInt32) MapUint8(f func(el int32) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt32) Max

func (c ChannelInt32) Max() (int32, error)

Max returns the maximal element from channel

func (ChannelInt32) Min

func (c ChannelInt32) Min() (int32, error)

Min returns the minimal element from channel

func (ChannelInt32) ReduceBool

func (c ChannelInt32) ReduceBool(acc bool, f func(el int32, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceByte

func (c ChannelInt32) ReduceByte(acc byte, f func(el int32, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceError

func (c ChannelInt32) ReduceError(acc error, f func(el int32, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceFloat32

func (c ChannelInt32) ReduceFloat32(acc float32, f func(el int32, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceFloat64

func (c ChannelInt32) ReduceFloat64(acc float64, f func(el int32, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceInt

func (c ChannelInt32) ReduceInt(acc int, f func(el int32, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceInt16

func (c ChannelInt32) ReduceInt16(acc int16, f func(el int32, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceInt32

func (c ChannelInt32) ReduceInt32(acc int32, f func(el int32, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceInt64

func (c ChannelInt32) ReduceInt64(acc int64, f func(el int32, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceInt8

func (c ChannelInt32) ReduceInt8(acc int8, f func(el int32, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceInterface

func (c ChannelInt32) ReduceInterface(acc interface{}, f func(el int32, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceRune

func (c ChannelInt32) ReduceRune(acc rune, f func(el int32, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceString

func (c ChannelInt32) ReduceString(acc string, f func(el int32, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceUint

func (c ChannelInt32) ReduceUint(acc uint, f func(el int32, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceUint16

func (c ChannelInt32) ReduceUint16(acc uint16, f func(el int32, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceUint32

func (c ChannelInt32) ReduceUint32(acc uint32, f func(el int32, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceUint64

func (c ChannelInt32) ReduceUint64(acc uint64, f func(el int32, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ReduceUint8

func (c ChannelInt32) ReduceUint8(acc uint8, f func(el int32, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt32) ScanBool

func (c ChannelInt32) ScanBool(acc bool, f func(el int32, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanByte

func (c ChannelInt32) ScanByte(acc byte, f func(el int32, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanError

func (c ChannelInt32) ScanError(acc error, f func(el int32, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanFloat32

func (c ChannelInt32) ScanFloat32(acc float32, f func(el int32, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanFloat64

func (c ChannelInt32) ScanFloat64(acc float64, f func(el int32, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanInt

func (c ChannelInt32) ScanInt(acc int, f func(el int32, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanInt16

func (c ChannelInt32) ScanInt16(acc int16, f func(el int32, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanInt32

func (c ChannelInt32) ScanInt32(acc int32, f func(el int32, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanInt64

func (c ChannelInt32) ScanInt64(acc int64, f func(el int32, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanInt8

func (c ChannelInt32) ScanInt8(acc int8, f func(el int32, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanInterface

func (c ChannelInt32) ScanInterface(acc interface{}, f func(el int32, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanRune

func (c ChannelInt32) ScanRune(acc rune, f func(el int32, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanString

func (c ChannelInt32) ScanString(acc string, f func(el int32, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanUint

func (c ChannelInt32) ScanUint(acc uint, f func(el int32, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanUint16

func (c ChannelInt32) ScanUint16(acc uint16, f func(el int32, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanUint32

func (c ChannelInt32) ScanUint32(acc uint32, f func(el int32, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanUint64

func (c ChannelInt32) ScanUint64(acc uint64, f func(el int32, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) ScanUint8

func (c ChannelInt32) ScanUint8(acc uint8, f func(el int32, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelInt32) Sum

func (c ChannelInt32) Sum() int32

Sum returns sum of all elements from channel

func (ChannelInt32) Take

func (c ChannelInt32) Take(count int) chan int32

Take takes first count elements from the channel.

func (ChannelInt32) Tee

func (c ChannelInt32) Tee(count int) []chan int32

Tee returns 2 channels with elements from the input channel

func (ChannelInt32) ToSlice

func (c ChannelInt32) ToSlice() []int32

ToSlice returns slice with all elements from channel.

type ChannelInt64

type ChannelInt64 struct {
	Data chan int64
}

Channel is a set of operations with channel

func (ChannelInt64) All

func (c ChannelInt64) All(f func(el int64) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelInt64) Any

func (c ChannelInt64) Any(f func(el int64) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelInt64) ChunkEvery

func (c ChannelInt64) ChunkEvery(count int) chan []int64

ChunkEvery returns channel with slices containing count elements each

func (ChannelInt64) Count

func (c ChannelInt64) Count(el int64) int

Count return count of el occurences in channel.

func (ChannelInt64) Drop

func (c ChannelInt64) Drop(n int) chan int64

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelInt64) Each

func (c ChannelInt64) Each(f func(el int64))

Each calls f for every element in the channel

func (ChannelInt64) Filter

func (c ChannelInt64) Filter(f func(el int64) bool) chan int64

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelInt64) MapBool

func (c ChannelInt64) MapBool(f func(el int64) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapByte

func (c ChannelInt64) MapByte(f func(el int64) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapError

func (c ChannelInt64) MapError(f func(el int64) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapFloat32

func (c ChannelInt64) MapFloat32(f func(el int64) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapFloat64

func (c ChannelInt64) MapFloat64(f func(el int64) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapInt

func (c ChannelInt64) MapInt(f func(el int64) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapInt16

func (c ChannelInt64) MapInt16(f func(el int64) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapInt32

func (c ChannelInt64) MapInt32(f func(el int64) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapInt64

func (c ChannelInt64) MapInt64(f func(el int64) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapInt8

func (c ChannelInt64) MapInt8(f func(el int64) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapInterface

func (c ChannelInt64) MapInterface(f func(el int64) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapRune

func (c ChannelInt64) MapRune(f func(el int64) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapString

func (c ChannelInt64) MapString(f func(el int64) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapUint

func (c ChannelInt64) MapUint(f func(el int64) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapUint16

func (c ChannelInt64) MapUint16(f func(el int64) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapUint32

func (c ChannelInt64) MapUint32(f func(el int64) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapUint64

func (c ChannelInt64) MapUint64(f func(el int64) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) MapUint8

func (c ChannelInt64) MapUint8(f func(el int64) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt64) Max

func (c ChannelInt64) Max() (int64, error)

Max returns the maximal element from channel

func (ChannelInt64) Min

func (c ChannelInt64) Min() (int64, error)

Min returns the minimal element from channel

func (ChannelInt64) ReduceBool

func (c ChannelInt64) ReduceBool(acc bool, f func(el int64, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceByte

func (c ChannelInt64) ReduceByte(acc byte, f func(el int64, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceError

func (c ChannelInt64) ReduceError(acc error, f func(el int64, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceFloat32

func (c ChannelInt64) ReduceFloat32(acc float32, f func(el int64, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceFloat64

func (c ChannelInt64) ReduceFloat64(acc float64, f func(el int64, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceInt

func (c ChannelInt64) ReduceInt(acc int, f func(el int64, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceInt16

func (c ChannelInt64) ReduceInt16(acc int16, f func(el int64, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceInt32

func (c ChannelInt64) ReduceInt32(acc int32, f func(el int64, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceInt64

func (c ChannelInt64) ReduceInt64(acc int64, f func(el int64, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceInt8

func (c ChannelInt64) ReduceInt8(acc int8, f func(el int64, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceInterface

func (c ChannelInt64) ReduceInterface(acc interface{}, f func(el int64, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceRune

func (c ChannelInt64) ReduceRune(acc rune, f func(el int64, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceString

func (c ChannelInt64) ReduceString(acc string, f func(el int64, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceUint

func (c ChannelInt64) ReduceUint(acc uint, f func(el int64, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceUint16

func (c ChannelInt64) ReduceUint16(acc uint16, f func(el int64, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceUint32

func (c ChannelInt64) ReduceUint32(acc uint32, f func(el int64, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceUint64

func (c ChannelInt64) ReduceUint64(acc uint64, f func(el int64, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ReduceUint8

func (c ChannelInt64) ReduceUint8(acc uint8, f func(el int64, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt64) ScanBool

func (c ChannelInt64) ScanBool(acc bool, f func(el int64, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanByte

func (c ChannelInt64) ScanByte(acc byte, f func(el int64, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanError

func (c ChannelInt64) ScanError(acc error, f func(el int64, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanFloat32

func (c ChannelInt64) ScanFloat32(acc float32, f func(el int64, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanFloat64

func (c ChannelInt64) ScanFloat64(acc float64, f func(el int64, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanInt

func (c ChannelInt64) ScanInt(acc int, f func(el int64, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanInt16

func (c ChannelInt64) ScanInt16(acc int16, f func(el int64, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanInt32

func (c ChannelInt64) ScanInt32(acc int32, f func(el int64, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanInt64

func (c ChannelInt64) ScanInt64(acc int64, f func(el int64, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanInt8

func (c ChannelInt64) ScanInt8(acc int8, f func(el int64, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanInterface

func (c ChannelInt64) ScanInterface(acc interface{}, f func(el int64, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanRune

func (c ChannelInt64) ScanRune(acc rune, f func(el int64, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanString

func (c ChannelInt64) ScanString(acc string, f func(el int64, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanUint

func (c ChannelInt64) ScanUint(acc uint, f func(el int64, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanUint16

func (c ChannelInt64) ScanUint16(acc uint16, f func(el int64, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanUint32

func (c ChannelInt64) ScanUint32(acc uint32, f func(el int64, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanUint64

func (c ChannelInt64) ScanUint64(acc uint64, f func(el int64, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) ScanUint8

func (c ChannelInt64) ScanUint8(acc uint8, f func(el int64, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelInt64) Sum

func (c ChannelInt64) Sum() int64

Sum returns sum of all elements from channel

func (ChannelInt64) Take

func (c ChannelInt64) Take(count int) chan int64

Take takes first count elements from the channel.

func (ChannelInt64) Tee

func (c ChannelInt64) Tee(count int) []chan int64

Tee returns 2 channels with elements from the input channel

func (ChannelInt64) ToSlice

func (c ChannelInt64) ToSlice() []int64

ToSlice returns slice with all elements from channel.

type ChannelInt8

type ChannelInt8 struct {
	Data chan int8
}

Channel is a set of operations with channel

func (ChannelInt8) All

func (c ChannelInt8) All(f func(el int8) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelInt8) Any

func (c ChannelInt8) Any(f func(el int8) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelInt8) ChunkEvery

func (c ChannelInt8) ChunkEvery(count int) chan []int8

ChunkEvery returns channel with slices containing count elements each

func (ChannelInt8) Count

func (c ChannelInt8) Count(el int8) int

Count return count of el occurences in channel.

func (ChannelInt8) Drop

func (c ChannelInt8) Drop(n int) chan int8

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelInt8) Each

func (c ChannelInt8) Each(f func(el int8))

Each calls f for every element in the channel

func (ChannelInt8) Filter

func (c ChannelInt8) Filter(f func(el int8) bool) chan int8

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelInt8) MapBool

func (c ChannelInt8) MapBool(f func(el int8) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapByte

func (c ChannelInt8) MapByte(f func(el int8) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapError

func (c ChannelInt8) MapError(f func(el int8) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapFloat32

func (c ChannelInt8) MapFloat32(f func(el int8) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapFloat64

func (c ChannelInt8) MapFloat64(f func(el int8) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapInt

func (c ChannelInt8) MapInt(f func(el int8) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapInt16

func (c ChannelInt8) MapInt16(f func(el int8) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapInt32

func (c ChannelInt8) MapInt32(f func(el int8) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapInt64

func (c ChannelInt8) MapInt64(f func(el int8) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapInt8

func (c ChannelInt8) MapInt8(f func(el int8) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapInterface

func (c ChannelInt8) MapInterface(f func(el int8) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapRune

func (c ChannelInt8) MapRune(f func(el int8) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapString

func (c ChannelInt8) MapString(f func(el int8) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapUint

func (c ChannelInt8) MapUint(f func(el int8) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapUint16

func (c ChannelInt8) MapUint16(f func(el int8) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapUint32

func (c ChannelInt8) MapUint32(f func(el int8) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapUint64

func (c ChannelInt8) MapUint64(f func(el int8) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) MapUint8

func (c ChannelInt8) MapUint8(f func(el int8) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelInt8) Max

func (c ChannelInt8) Max() (int8, error)

Max returns the maximal element from channel

func (ChannelInt8) Min

func (c ChannelInt8) Min() (int8, error)

Min returns the minimal element from channel

func (ChannelInt8) ReduceBool

func (c ChannelInt8) ReduceBool(acc bool, f func(el int8, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceByte

func (c ChannelInt8) ReduceByte(acc byte, f func(el int8, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceError

func (c ChannelInt8) ReduceError(acc error, f func(el int8, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceFloat32

func (c ChannelInt8) ReduceFloat32(acc float32, f func(el int8, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceFloat64

func (c ChannelInt8) ReduceFloat64(acc float64, f func(el int8, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceInt

func (c ChannelInt8) ReduceInt(acc int, f func(el int8, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceInt16

func (c ChannelInt8) ReduceInt16(acc int16, f func(el int8, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceInt32

func (c ChannelInt8) ReduceInt32(acc int32, f func(el int8, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceInt64

func (c ChannelInt8) ReduceInt64(acc int64, f func(el int8, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceInt8

func (c ChannelInt8) ReduceInt8(acc int8, f func(el int8, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceInterface

func (c ChannelInt8) ReduceInterface(acc interface{}, f func(el int8, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceRune

func (c ChannelInt8) ReduceRune(acc rune, f func(el int8, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceString

func (c ChannelInt8) ReduceString(acc string, f func(el int8, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceUint

func (c ChannelInt8) ReduceUint(acc uint, f func(el int8, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceUint16

func (c ChannelInt8) ReduceUint16(acc uint16, f func(el int8, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceUint32

func (c ChannelInt8) ReduceUint32(acc uint32, f func(el int8, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceUint64

func (c ChannelInt8) ReduceUint64(acc uint64, f func(el int8, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ReduceUint8

func (c ChannelInt8) ReduceUint8(acc uint8, f func(el int8, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInt8) ScanBool

func (c ChannelInt8) ScanBool(acc bool, f func(el int8, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanByte

func (c ChannelInt8) ScanByte(acc byte, f func(el int8, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanError

func (c ChannelInt8) ScanError(acc error, f func(el int8, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanFloat32

func (c ChannelInt8) ScanFloat32(acc float32, f func(el int8, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanFloat64

func (c ChannelInt8) ScanFloat64(acc float64, f func(el int8, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanInt

func (c ChannelInt8) ScanInt(acc int, f func(el int8, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanInt16

func (c ChannelInt8) ScanInt16(acc int16, f func(el int8, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanInt32

func (c ChannelInt8) ScanInt32(acc int32, f func(el int8, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanInt64

func (c ChannelInt8) ScanInt64(acc int64, f func(el int8, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanInt8

func (c ChannelInt8) ScanInt8(acc int8, f func(el int8, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanInterface

func (c ChannelInt8) ScanInterface(acc interface{}, f func(el int8, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanRune

func (c ChannelInt8) ScanRune(acc rune, f func(el int8, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanString

func (c ChannelInt8) ScanString(acc string, f func(el int8, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanUint

func (c ChannelInt8) ScanUint(acc uint, f func(el int8, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanUint16

func (c ChannelInt8) ScanUint16(acc uint16, f func(el int8, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanUint32

func (c ChannelInt8) ScanUint32(acc uint32, f func(el int8, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanUint64

func (c ChannelInt8) ScanUint64(acc uint64, f func(el int8, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) ScanUint8

func (c ChannelInt8) ScanUint8(acc uint8, f func(el int8, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelInt8) Sum

func (c ChannelInt8) Sum() int8

Sum returns sum of all elements from channel

func (ChannelInt8) Take

func (c ChannelInt8) Take(count int) chan int8

Take takes first count elements from the channel.

func (ChannelInt8) Tee

func (c ChannelInt8) Tee(count int) []chan int8

Tee returns 2 channels with elements from the input channel

func (ChannelInt8) ToSlice

func (c ChannelInt8) ToSlice() []int8

ToSlice returns slice with all elements from channel.

type ChannelInterface

type ChannelInterface struct {
	Data chan interface{}
}

Channel is a set of operations with channel

func (ChannelInterface) All

func (c ChannelInterface) All(f func(el interface{}) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelInterface) Any

func (c ChannelInterface) Any(f func(el interface{}) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelInterface) ChunkEvery

func (c ChannelInterface) ChunkEvery(count int) chan []interface{}

ChunkEvery returns channel with slices containing count elements each

func (ChannelInterface) Count

func (c ChannelInterface) Count(el interface{}) int

Count return count of el occurences in channel.

func (ChannelInterface) Drop

func (c ChannelInterface) Drop(n int) chan interface{}

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelInterface) Each

func (c ChannelInterface) Each(f func(el interface{}))

Each calls f for every element in the channel

func (ChannelInterface) Filter

func (c ChannelInterface) Filter(f func(el interface{}) bool) chan interface{}

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelInterface) MapBool

func (c ChannelInterface) MapBool(f func(el interface{}) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapByte

func (c ChannelInterface) MapByte(f func(el interface{}) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapError

func (c ChannelInterface) MapError(f func(el interface{}) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapFloat32

func (c ChannelInterface) MapFloat32(f func(el interface{}) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapFloat64

func (c ChannelInterface) MapFloat64(f func(el interface{}) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapInt

func (c ChannelInterface) MapInt(f func(el interface{}) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapInt16

func (c ChannelInterface) MapInt16(f func(el interface{}) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapInt32

func (c ChannelInterface) MapInt32(f func(el interface{}) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapInt64

func (c ChannelInterface) MapInt64(f func(el interface{}) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapInt8

func (c ChannelInterface) MapInt8(f func(el interface{}) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapInterface

func (c ChannelInterface) MapInterface(f func(el interface{}) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapRune

func (c ChannelInterface) MapRune(f func(el interface{}) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapString

func (c ChannelInterface) MapString(f func(el interface{}) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapUint

func (c ChannelInterface) MapUint(f func(el interface{}) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapUint16

func (c ChannelInterface) MapUint16(f func(el interface{}) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapUint32

func (c ChannelInterface) MapUint32(f func(el interface{}) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapUint64

func (c ChannelInterface) MapUint64(f func(el interface{}) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) MapUint8

func (c ChannelInterface) MapUint8(f func(el interface{}) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelInterface) ReduceBool

func (c ChannelInterface) ReduceBool(acc bool, f func(el interface{}, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceByte

func (c ChannelInterface) ReduceByte(acc byte, f func(el interface{}, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceError

func (c ChannelInterface) ReduceError(acc error, f func(el interface{}, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceFloat32

func (c ChannelInterface) ReduceFloat32(acc float32, f func(el interface{}, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceFloat64

func (c ChannelInterface) ReduceFloat64(acc float64, f func(el interface{}, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceInt

func (c ChannelInterface) ReduceInt(acc int, f func(el interface{}, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceInt16

func (c ChannelInterface) ReduceInt16(acc int16, f func(el interface{}, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceInt32

func (c ChannelInterface) ReduceInt32(acc int32, f func(el interface{}, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceInt64

func (c ChannelInterface) ReduceInt64(acc int64, f func(el interface{}, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceInt8

func (c ChannelInterface) ReduceInt8(acc int8, f func(el interface{}, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceInterface

func (c ChannelInterface) ReduceInterface(acc interface{}, f func(el interface{}, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceRune

func (c ChannelInterface) ReduceRune(acc rune, f func(el interface{}, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceString

func (c ChannelInterface) ReduceString(acc string, f func(el interface{}, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceUint

func (c ChannelInterface) ReduceUint(acc uint, f func(el interface{}, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceUint16

func (c ChannelInterface) ReduceUint16(acc uint16, f func(el interface{}, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceUint32

func (c ChannelInterface) ReduceUint32(acc uint32, f func(el interface{}, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceUint64

func (c ChannelInterface) ReduceUint64(acc uint64, f func(el interface{}, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ReduceUint8

func (c ChannelInterface) ReduceUint8(acc uint8, f func(el interface{}, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelInterface) ScanBool

func (c ChannelInterface) ScanBool(acc bool, f func(el interface{}, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanByte

func (c ChannelInterface) ScanByte(acc byte, f func(el interface{}, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanError

func (c ChannelInterface) ScanError(acc error, f func(el interface{}, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanFloat32

func (c ChannelInterface) ScanFloat32(acc float32, f func(el interface{}, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanFloat64

func (c ChannelInterface) ScanFloat64(acc float64, f func(el interface{}, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanInt

func (c ChannelInterface) ScanInt(acc int, f func(el interface{}, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanInt16

func (c ChannelInterface) ScanInt16(acc int16, f func(el interface{}, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanInt32

func (c ChannelInterface) ScanInt32(acc int32, f func(el interface{}, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanInt64

func (c ChannelInterface) ScanInt64(acc int64, f func(el interface{}, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanInt8

func (c ChannelInterface) ScanInt8(acc int8, f func(el interface{}, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanInterface

func (c ChannelInterface) ScanInterface(acc interface{}, f func(el interface{}, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanRune

func (c ChannelInterface) ScanRune(acc rune, f func(el interface{}, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanString

func (c ChannelInterface) ScanString(acc string, f func(el interface{}, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanUint

func (c ChannelInterface) ScanUint(acc uint, f func(el interface{}, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanUint16

func (c ChannelInterface) ScanUint16(acc uint16, f func(el interface{}, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanUint32

func (c ChannelInterface) ScanUint32(acc uint32, f func(el interface{}, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanUint64

func (c ChannelInterface) ScanUint64(acc uint64, f func(el interface{}, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) ScanUint8

func (c ChannelInterface) ScanUint8(acc uint8, f func(el interface{}, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelInterface) Take

func (c ChannelInterface) Take(count int) chan interface{}

Take takes first count elements from the channel.

func (ChannelInterface) Tee

func (c ChannelInterface) Tee(count int) []chan interface{}

Tee returns 2 channels with elements from the input channel

func (ChannelInterface) ToSlice

func (c ChannelInterface) ToSlice() []interface{}

ToSlice returns slice with all elements from channel.

type ChannelRune

type ChannelRune struct {
	Data chan rune
}

Channel is a set of operations with channel

func (ChannelRune) All

func (c ChannelRune) All(f func(el rune) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelRune) Any

func (c ChannelRune) Any(f func(el rune) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelRune) ChunkEvery

func (c ChannelRune) ChunkEvery(count int) chan []rune

ChunkEvery returns channel with slices containing count elements each

func (ChannelRune) Count

func (c ChannelRune) Count(el rune) int

Count return count of el occurences in channel.

func (ChannelRune) Drop

func (c ChannelRune) Drop(n int) chan rune

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelRune) Each

func (c ChannelRune) Each(f func(el rune))

Each calls f for every element in the channel

func (ChannelRune) Filter

func (c ChannelRune) Filter(f func(el rune) bool) chan rune

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelRune) MapBool

func (c ChannelRune) MapBool(f func(el rune) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapByte

func (c ChannelRune) MapByte(f func(el rune) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapError

func (c ChannelRune) MapError(f func(el rune) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapFloat32

func (c ChannelRune) MapFloat32(f func(el rune) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapFloat64

func (c ChannelRune) MapFloat64(f func(el rune) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapInt

func (c ChannelRune) MapInt(f func(el rune) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapInt16

func (c ChannelRune) MapInt16(f func(el rune) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapInt32

func (c ChannelRune) MapInt32(f func(el rune) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapInt64

func (c ChannelRune) MapInt64(f func(el rune) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapInt8

func (c ChannelRune) MapInt8(f func(el rune) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapInterface

func (c ChannelRune) MapInterface(f func(el rune) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapRune

func (c ChannelRune) MapRune(f func(el rune) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapString

func (c ChannelRune) MapString(f func(el rune) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapUint

func (c ChannelRune) MapUint(f func(el rune) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapUint16

func (c ChannelRune) MapUint16(f func(el rune) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapUint32

func (c ChannelRune) MapUint32(f func(el rune) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapUint64

func (c ChannelRune) MapUint64(f func(el rune) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) MapUint8

func (c ChannelRune) MapUint8(f func(el rune) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelRune) Max

func (c ChannelRune) Max() (rune, error)

Max returns the maximal element from channel

func (ChannelRune) Min

func (c ChannelRune) Min() (rune, error)

Min returns the minimal element from channel

func (ChannelRune) ReduceBool

func (c ChannelRune) ReduceBool(acc bool, f func(el rune, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceByte

func (c ChannelRune) ReduceByte(acc byte, f func(el rune, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceError

func (c ChannelRune) ReduceError(acc error, f func(el rune, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceFloat32

func (c ChannelRune) ReduceFloat32(acc float32, f func(el rune, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceFloat64

func (c ChannelRune) ReduceFloat64(acc float64, f func(el rune, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceInt

func (c ChannelRune) ReduceInt(acc int, f func(el rune, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceInt16

func (c ChannelRune) ReduceInt16(acc int16, f func(el rune, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceInt32

func (c ChannelRune) ReduceInt32(acc int32, f func(el rune, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceInt64

func (c ChannelRune) ReduceInt64(acc int64, f func(el rune, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceInt8

func (c ChannelRune) ReduceInt8(acc int8, f func(el rune, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceInterface

func (c ChannelRune) ReduceInterface(acc interface{}, f func(el rune, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceRune

func (c ChannelRune) ReduceRune(acc rune, f func(el rune, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceString

func (c ChannelRune) ReduceString(acc string, f func(el rune, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceUint

func (c ChannelRune) ReduceUint(acc uint, f func(el rune, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceUint16

func (c ChannelRune) ReduceUint16(acc uint16, f func(el rune, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceUint32

func (c ChannelRune) ReduceUint32(acc uint32, f func(el rune, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceUint64

func (c ChannelRune) ReduceUint64(acc uint64, f func(el rune, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ReduceUint8

func (c ChannelRune) ReduceUint8(acc uint8, f func(el rune, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelRune) ScanBool

func (c ChannelRune) ScanBool(acc bool, f func(el rune, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanByte

func (c ChannelRune) ScanByte(acc byte, f func(el rune, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanError

func (c ChannelRune) ScanError(acc error, f func(el rune, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanFloat32

func (c ChannelRune) ScanFloat32(acc float32, f func(el rune, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanFloat64

func (c ChannelRune) ScanFloat64(acc float64, f func(el rune, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanInt

func (c ChannelRune) ScanInt(acc int, f func(el rune, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanInt16

func (c ChannelRune) ScanInt16(acc int16, f func(el rune, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanInt32

func (c ChannelRune) ScanInt32(acc int32, f func(el rune, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanInt64

func (c ChannelRune) ScanInt64(acc int64, f func(el rune, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanInt8

func (c ChannelRune) ScanInt8(acc int8, f func(el rune, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanInterface

func (c ChannelRune) ScanInterface(acc interface{}, f func(el rune, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanRune

func (c ChannelRune) ScanRune(acc rune, f func(el rune, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanString

func (c ChannelRune) ScanString(acc string, f func(el rune, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanUint

func (c ChannelRune) ScanUint(acc uint, f func(el rune, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanUint16

func (c ChannelRune) ScanUint16(acc uint16, f func(el rune, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanUint32

func (c ChannelRune) ScanUint32(acc uint32, f func(el rune, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanUint64

func (c ChannelRune) ScanUint64(acc uint64, f func(el rune, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelRune) ScanUint8

func (c ChannelRune) ScanUint8(acc uint8, f func(el rune, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelRune) Sum

func (c ChannelRune) Sum() rune

Sum returns sum of all elements from channel

func (ChannelRune) Take

func (c ChannelRune) Take(count int) chan rune

Take takes first count elements from the channel.

func (ChannelRune) Tee

func (c ChannelRune) Tee(count int) []chan rune

Tee returns 2 channels with elements from the input channel

func (ChannelRune) ToSlice

func (c ChannelRune) ToSlice() []rune

ToSlice returns slice with all elements from channel.

type ChannelString

type ChannelString struct {
	Data chan string
}

Channel is a set of operations with channel

func (ChannelString) All

func (c ChannelString) All(f func(el string) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelString) Any

func (c ChannelString) Any(f func(el string) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelString) ChunkEvery

func (c ChannelString) ChunkEvery(count int) chan []string

ChunkEvery returns channel with slices containing count elements each

func (ChannelString) Count

func (c ChannelString) Count(el string) int

Count return count of el occurences in channel.

func (ChannelString) Drop

func (c ChannelString) Drop(n int) chan string

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelString) Each

func (c ChannelString) Each(f func(el string))

Each calls f for every element in the channel

func (ChannelString) Filter

func (c ChannelString) Filter(f func(el string) bool) chan string

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelString) MapBool

func (c ChannelString) MapBool(f func(el string) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapByte

func (c ChannelString) MapByte(f func(el string) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapError

func (c ChannelString) MapError(f func(el string) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapFloat32

func (c ChannelString) MapFloat32(f func(el string) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapFloat64

func (c ChannelString) MapFloat64(f func(el string) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapInt

func (c ChannelString) MapInt(f func(el string) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapInt16

func (c ChannelString) MapInt16(f func(el string) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapInt32

func (c ChannelString) MapInt32(f func(el string) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapInt64

func (c ChannelString) MapInt64(f func(el string) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapInt8

func (c ChannelString) MapInt8(f func(el string) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapInterface

func (c ChannelString) MapInterface(f func(el string) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapRune

func (c ChannelString) MapRune(f func(el string) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapString

func (c ChannelString) MapString(f func(el string) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapUint

func (c ChannelString) MapUint(f func(el string) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapUint16

func (c ChannelString) MapUint16(f func(el string) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapUint32

func (c ChannelString) MapUint32(f func(el string) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapUint64

func (c ChannelString) MapUint64(f func(el string) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelString) MapUint8

func (c ChannelString) MapUint8(f func(el string) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelString) Max

func (c ChannelString) Max() (string, error)

Max returns the maximal element from channel

func (ChannelString) Min

func (c ChannelString) Min() (string, error)

Min returns the minimal element from channel

func (ChannelString) ReduceBool

func (c ChannelString) ReduceBool(acc bool, f func(el string, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceByte

func (c ChannelString) ReduceByte(acc byte, f func(el string, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceError

func (c ChannelString) ReduceError(acc error, f func(el string, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceFloat32

func (c ChannelString) ReduceFloat32(acc float32, f func(el string, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceFloat64

func (c ChannelString) ReduceFloat64(acc float64, f func(el string, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceInt

func (c ChannelString) ReduceInt(acc int, f func(el string, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceInt16

func (c ChannelString) ReduceInt16(acc int16, f func(el string, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceInt32

func (c ChannelString) ReduceInt32(acc int32, f func(el string, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceInt64

func (c ChannelString) ReduceInt64(acc int64, f func(el string, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceInt8

func (c ChannelString) ReduceInt8(acc int8, f func(el string, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceInterface

func (c ChannelString) ReduceInterface(acc interface{}, f func(el string, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceRune

func (c ChannelString) ReduceRune(acc rune, f func(el string, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceString

func (c ChannelString) ReduceString(acc string, f func(el string, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceUint

func (c ChannelString) ReduceUint(acc uint, f func(el string, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceUint16

func (c ChannelString) ReduceUint16(acc uint16, f func(el string, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceUint32

func (c ChannelString) ReduceUint32(acc uint32, f func(el string, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceUint64

func (c ChannelString) ReduceUint64(acc uint64, f func(el string, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ReduceUint8

func (c ChannelString) ReduceUint8(acc uint8, f func(el string, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelString) ScanBool

func (c ChannelString) ScanBool(acc bool, f func(el string, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanByte

func (c ChannelString) ScanByte(acc byte, f func(el string, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanError

func (c ChannelString) ScanError(acc error, f func(el string, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanFloat32

func (c ChannelString) ScanFloat32(acc float32, f func(el string, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanFloat64

func (c ChannelString) ScanFloat64(acc float64, f func(el string, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanInt

func (c ChannelString) ScanInt(acc int, f func(el string, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanInt16

func (c ChannelString) ScanInt16(acc int16, f func(el string, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanInt32

func (c ChannelString) ScanInt32(acc int32, f func(el string, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanInt64

func (c ChannelString) ScanInt64(acc int64, f func(el string, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanInt8

func (c ChannelString) ScanInt8(acc int8, f func(el string, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanInterface

func (c ChannelString) ScanInterface(acc interface{}, f func(el string, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanRune

func (c ChannelString) ScanRune(acc rune, f func(el string, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanString

func (c ChannelString) ScanString(acc string, f func(el string, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanUint

func (c ChannelString) ScanUint(acc uint, f func(el string, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanUint16

func (c ChannelString) ScanUint16(acc uint16, f func(el string, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanUint32

func (c ChannelString) ScanUint32(acc uint32, f func(el string, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanUint64

func (c ChannelString) ScanUint64(acc uint64, f func(el string, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelString) ScanUint8

func (c ChannelString) ScanUint8(acc uint8, f func(el string, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelString) Sum

func (c ChannelString) Sum() string

Sum returns sum of all elements from channel

func (ChannelString) Take

func (c ChannelString) Take(count int) chan string

Take takes first count elements from the channel.

func (ChannelString) Tee

func (c ChannelString) Tee(count int) []chan string

Tee returns 2 channels with elements from the input channel

func (ChannelString) ToSlice

func (c ChannelString) ToSlice() []string

ToSlice returns slice with all elements from channel.

type ChannelUint

type ChannelUint struct {
	Data chan uint
}

Channel is a set of operations with channel

func (ChannelUint) All

func (c ChannelUint) All(f func(el uint) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelUint) Any

func (c ChannelUint) Any(f func(el uint) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelUint) ChunkEvery

func (c ChannelUint) ChunkEvery(count int) chan []uint

ChunkEvery returns channel with slices containing count elements each

func (ChannelUint) Count

func (c ChannelUint) Count(el uint) int

Count return count of el occurences in channel.

func (ChannelUint) Drop

func (c ChannelUint) Drop(n int) chan uint

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelUint) Each

func (c ChannelUint) Each(f func(el uint))

Each calls f for every element in the channel

func (ChannelUint) Filter

func (c ChannelUint) Filter(f func(el uint) bool) chan uint

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelUint) MapBool

func (c ChannelUint) MapBool(f func(el uint) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapByte

func (c ChannelUint) MapByte(f func(el uint) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapError

func (c ChannelUint) MapError(f func(el uint) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapFloat32

func (c ChannelUint) MapFloat32(f func(el uint) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapFloat64

func (c ChannelUint) MapFloat64(f func(el uint) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapInt

func (c ChannelUint) MapInt(f func(el uint) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapInt16

func (c ChannelUint) MapInt16(f func(el uint) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapInt32

func (c ChannelUint) MapInt32(f func(el uint) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapInt64

func (c ChannelUint) MapInt64(f func(el uint) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapInt8

func (c ChannelUint) MapInt8(f func(el uint) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapInterface

func (c ChannelUint) MapInterface(f func(el uint) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapRune

func (c ChannelUint) MapRune(f func(el uint) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapString

func (c ChannelUint) MapString(f func(el uint) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapUint

func (c ChannelUint) MapUint(f func(el uint) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapUint16

func (c ChannelUint) MapUint16(f func(el uint) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapUint32

func (c ChannelUint) MapUint32(f func(el uint) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapUint64

func (c ChannelUint) MapUint64(f func(el uint) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) MapUint8

func (c ChannelUint) MapUint8(f func(el uint) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint) Max

func (c ChannelUint) Max() (uint, error)

Max returns the maximal element from channel

func (ChannelUint) Min

func (c ChannelUint) Min() (uint, error)

Min returns the minimal element from channel

func (ChannelUint) ReduceBool

func (c ChannelUint) ReduceBool(acc bool, f func(el uint, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceByte

func (c ChannelUint) ReduceByte(acc byte, f func(el uint, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceError

func (c ChannelUint) ReduceError(acc error, f func(el uint, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceFloat32

func (c ChannelUint) ReduceFloat32(acc float32, f func(el uint, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceFloat64

func (c ChannelUint) ReduceFloat64(acc float64, f func(el uint, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceInt

func (c ChannelUint) ReduceInt(acc int, f func(el uint, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceInt16

func (c ChannelUint) ReduceInt16(acc int16, f func(el uint, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceInt32

func (c ChannelUint) ReduceInt32(acc int32, f func(el uint, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceInt64

func (c ChannelUint) ReduceInt64(acc int64, f func(el uint, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceInt8

func (c ChannelUint) ReduceInt8(acc int8, f func(el uint, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceInterface

func (c ChannelUint) ReduceInterface(acc interface{}, f func(el uint, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceRune

func (c ChannelUint) ReduceRune(acc rune, f func(el uint, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceString

func (c ChannelUint) ReduceString(acc string, f func(el uint, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceUint

func (c ChannelUint) ReduceUint(acc uint, f func(el uint, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceUint16

func (c ChannelUint) ReduceUint16(acc uint16, f func(el uint, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceUint32

func (c ChannelUint) ReduceUint32(acc uint32, f func(el uint, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceUint64

func (c ChannelUint) ReduceUint64(acc uint64, f func(el uint, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ReduceUint8

func (c ChannelUint) ReduceUint8(acc uint8, f func(el uint, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint) ScanBool

func (c ChannelUint) ScanBool(acc bool, f func(el uint, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanByte

func (c ChannelUint) ScanByte(acc byte, f func(el uint, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanError

func (c ChannelUint) ScanError(acc error, f func(el uint, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanFloat32

func (c ChannelUint) ScanFloat32(acc float32, f func(el uint, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanFloat64

func (c ChannelUint) ScanFloat64(acc float64, f func(el uint, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanInt

func (c ChannelUint) ScanInt(acc int, f func(el uint, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanInt16

func (c ChannelUint) ScanInt16(acc int16, f func(el uint, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanInt32

func (c ChannelUint) ScanInt32(acc int32, f func(el uint, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanInt64

func (c ChannelUint) ScanInt64(acc int64, f func(el uint, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanInt8

func (c ChannelUint) ScanInt8(acc int8, f func(el uint, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanInterface

func (c ChannelUint) ScanInterface(acc interface{}, f func(el uint, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanRune

func (c ChannelUint) ScanRune(acc rune, f func(el uint, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanString

func (c ChannelUint) ScanString(acc string, f func(el uint, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanUint

func (c ChannelUint) ScanUint(acc uint, f func(el uint, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanUint16

func (c ChannelUint) ScanUint16(acc uint16, f func(el uint, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanUint32

func (c ChannelUint) ScanUint32(acc uint32, f func(el uint, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanUint64

func (c ChannelUint) ScanUint64(acc uint64, f func(el uint, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelUint) ScanUint8

func (c ChannelUint) ScanUint8(acc uint8, f func(el uint, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelUint) Sum

func (c ChannelUint) Sum() uint

Sum returns sum of all elements from channel

func (ChannelUint) Take

func (c ChannelUint) Take(count int) chan uint

Take takes first count elements from the channel.

func (ChannelUint) Tee

func (c ChannelUint) Tee(count int) []chan uint

Tee returns 2 channels with elements from the input channel

func (ChannelUint) ToSlice

func (c ChannelUint) ToSlice() []uint

ToSlice returns slice with all elements from channel.

type ChannelUint16

type ChannelUint16 struct {
	Data chan uint16
}

Channel is a set of operations with channel

func (ChannelUint16) All

func (c ChannelUint16) All(f func(el uint16) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelUint16) Any

func (c ChannelUint16) Any(f func(el uint16) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelUint16) ChunkEvery

func (c ChannelUint16) ChunkEvery(count int) chan []uint16

ChunkEvery returns channel with slices containing count elements each

func (ChannelUint16) Count

func (c ChannelUint16) Count(el uint16) int

Count return count of el occurences in channel.

func (ChannelUint16) Drop

func (c ChannelUint16) Drop(n int) chan uint16

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelUint16) Each

func (c ChannelUint16) Each(f func(el uint16))

Each calls f for every element in the channel

func (ChannelUint16) Filter

func (c ChannelUint16) Filter(f func(el uint16) bool) chan uint16

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelUint16) MapBool

func (c ChannelUint16) MapBool(f func(el uint16) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapByte

func (c ChannelUint16) MapByte(f func(el uint16) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapError

func (c ChannelUint16) MapError(f func(el uint16) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapFloat32

func (c ChannelUint16) MapFloat32(f func(el uint16) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapFloat64

func (c ChannelUint16) MapFloat64(f func(el uint16) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapInt

func (c ChannelUint16) MapInt(f func(el uint16) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapInt16

func (c ChannelUint16) MapInt16(f func(el uint16) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapInt32

func (c ChannelUint16) MapInt32(f func(el uint16) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapInt64

func (c ChannelUint16) MapInt64(f func(el uint16) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapInt8

func (c ChannelUint16) MapInt8(f func(el uint16) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapInterface

func (c ChannelUint16) MapInterface(f func(el uint16) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapRune

func (c ChannelUint16) MapRune(f func(el uint16) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapString

func (c ChannelUint16) MapString(f func(el uint16) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapUint

func (c ChannelUint16) MapUint(f func(el uint16) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapUint16

func (c ChannelUint16) MapUint16(f func(el uint16) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapUint32

func (c ChannelUint16) MapUint32(f func(el uint16) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapUint64

func (c ChannelUint16) MapUint64(f func(el uint16) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) MapUint8

func (c ChannelUint16) MapUint8(f func(el uint16) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint16) Max

func (c ChannelUint16) Max() (uint16, error)

Max returns the maximal element from channel

func (ChannelUint16) Min

func (c ChannelUint16) Min() (uint16, error)

Min returns the minimal element from channel

func (ChannelUint16) ReduceBool

func (c ChannelUint16) ReduceBool(acc bool, f func(el uint16, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceByte

func (c ChannelUint16) ReduceByte(acc byte, f func(el uint16, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceError

func (c ChannelUint16) ReduceError(acc error, f func(el uint16, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceFloat32

func (c ChannelUint16) ReduceFloat32(acc float32, f func(el uint16, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceFloat64

func (c ChannelUint16) ReduceFloat64(acc float64, f func(el uint16, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceInt

func (c ChannelUint16) ReduceInt(acc int, f func(el uint16, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceInt16

func (c ChannelUint16) ReduceInt16(acc int16, f func(el uint16, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceInt32

func (c ChannelUint16) ReduceInt32(acc int32, f func(el uint16, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceInt64

func (c ChannelUint16) ReduceInt64(acc int64, f func(el uint16, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceInt8

func (c ChannelUint16) ReduceInt8(acc int8, f func(el uint16, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceInterface

func (c ChannelUint16) ReduceInterface(acc interface{}, f func(el uint16, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceRune

func (c ChannelUint16) ReduceRune(acc rune, f func(el uint16, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceString

func (c ChannelUint16) ReduceString(acc string, f func(el uint16, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceUint

func (c ChannelUint16) ReduceUint(acc uint, f func(el uint16, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceUint16

func (c ChannelUint16) ReduceUint16(acc uint16, f func(el uint16, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceUint32

func (c ChannelUint16) ReduceUint32(acc uint32, f func(el uint16, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceUint64

func (c ChannelUint16) ReduceUint64(acc uint64, f func(el uint16, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ReduceUint8

func (c ChannelUint16) ReduceUint8(acc uint8, f func(el uint16, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint16) ScanBool

func (c ChannelUint16) ScanBool(acc bool, f func(el uint16, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanByte

func (c ChannelUint16) ScanByte(acc byte, f func(el uint16, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanError

func (c ChannelUint16) ScanError(acc error, f func(el uint16, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanFloat32

func (c ChannelUint16) ScanFloat32(acc float32, f func(el uint16, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanFloat64

func (c ChannelUint16) ScanFloat64(acc float64, f func(el uint16, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanInt

func (c ChannelUint16) ScanInt(acc int, f func(el uint16, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanInt16

func (c ChannelUint16) ScanInt16(acc int16, f func(el uint16, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanInt32

func (c ChannelUint16) ScanInt32(acc int32, f func(el uint16, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanInt64

func (c ChannelUint16) ScanInt64(acc int64, f func(el uint16, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanInt8

func (c ChannelUint16) ScanInt8(acc int8, f func(el uint16, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanInterface

func (c ChannelUint16) ScanInterface(acc interface{}, f func(el uint16, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanRune

func (c ChannelUint16) ScanRune(acc rune, f func(el uint16, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanString

func (c ChannelUint16) ScanString(acc string, f func(el uint16, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanUint

func (c ChannelUint16) ScanUint(acc uint, f func(el uint16, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanUint16

func (c ChannelUint16) ScanUint16(acc uint16, f func(el uint16, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanUint32

func (c ChannelUint16) ScanUint32(acc uint32, f func(el uint16, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanUint64

func (c ChannelUint16) ScanUint64(acc uint64, f func(el uint16, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) ScanUint8

func (c ChannelUint16) ScanUint8(acc uint8, f func(el uint16, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelUint16) Sum

func (c ChannelUint16) Sum() uint16

Sum returns sum of all elements from channel

func (ChannelUint16) Take

func (c ChannelUint16) Take(count int) chan uint16

Take takes first count elements from the channel.

func (ChannelUint16) Tee

func (c ChannelUint16) Tee(count int) []chan uint16

Tee returns 2 channels with elements from the input channel

func (ChannelUint16) ToSlice

func (c ChannelUint16) ToSlice() []uint16

ToSlice returns slice with all elements from channel.

type ChannelUint32

type ChannelUint32 struct {
	Data chan uint32
}

Channel is a set of operations with channel

func (ChannelUint32) All

func (c ChannelUint32) All(f func(el uint32) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelUint32) Any

func (c ChannelUint32) Any(f func(el uint32) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelUint32) ChunkEvery

func (c ChannelUint32) ChunkEvery(count int) chan []uint32

ChunkEvery returns channel with slices containing count elements each

func (ChannelUint32) Count

func (c ChannelUint32) Count(el uint32) int

Count return count of el occurences in channel.

func (ChannelUint32) Drop

func (c ChannelUint32) Drop(n int) chan uint32

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelUint32) Each

func (c ChannelUint32) Each(f func(el uint32))

Each calls f for every element in the channel

func (ChannelUint32) Filter

func (c ChannelUint32) Filter(f func(el uint32) bool) chan uint32

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelUint32) MapBool

func (c ChannelUint32) MapBool(f func(el uint32) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapByte

func (c ChannelUint32) MapByte(f func(el uint32) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapError

func (c ChannelUint32) MapError(f func(el uint32) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapFloat32

func (c ChannelUint32) MapFloat32(f func(el uint32) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapFloat64

func (c ChannelUint32) MapFloat64(f func(el uint32) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapInt

func (c ChannelUint32) MapInt(f func(el uint32) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapInt16

func (c ChannelUint32) MapInt16(f func(el uint32) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapInt32

func (c ChannelUint32) MapInt32(f func(el uint32) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapInt64

func (c ChannelUint32) MapInt64(f func(el uint32) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapInt8

func (c ChannelUint32) MapInt8(f func(el uint32) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapInterface

func (c ChannelUint32) MapInterface(f func(el uint32) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapRune

func (c ChannelUint32) MapRune(f func(el uint32) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapString

func (c ChannelUint32) MapString(f func(el uint32) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapUint

func (c ChannelUint32) MapUint(f func(el uint32) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapUint16

func (c ChannelUint32) MapUint16(f func(el uint32) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapUint32

func (c ChannelUint32) MapUint32(f func(el uint32) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapUint64

func (c ChannelUint32) MapUint64(f func(el uint32) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) MapUint8

func (c ChannelUint32) MapUint8(f func(el uint32) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint32) Max

func (c ChannelUint32) Max() (uint32, error)

Max returns the maximal element from channel

func (ChannelUint32) Min

func (c ChannelUint32) Min() (uint32, error)

Min returns the minimal element from channel

func (ChannelUint32) ReduceBool

func (c ChannelUint32) ReduceBool(acc bool, f func(el uint32, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceByte

func (c ChannelUint32) ReduceByte(acc byte, f func(el uint32, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceError

func (c ChannelUint32) ReduceError(acc error, f func(el uint32, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceFloat32

func (c ChannelUint32) ReduceFloat32(acc float32, f func(el uint32, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceFloat64

func (c ChannelUint32) ReduceFloat64(acc float64, f func(el uint32, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceInt

func (c ChannelUint32) ReduceInt(acc int, f func(el uint32, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceInt16

func (c ChannelUint32) ReduceInt16(acc int16, f func(el uint32, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceInt32

func (c ChannelUint32) ReduceInt32(acc int32, f func(el uint32, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceInt64

func (c ChannelUint32) ReduceInt64(acc int64, f func(el uint32, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceInt8

func (c ChannelUint32) ReduceInt8(acc int8, f func(el uint32, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceInterface

func (c ChannelUint32) ReduceInterface(acc interface{}, f func(el uint32, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceRune

func (c ChannelUint32) ReduceRune(acc rune, f func(el uint32, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceString

func (c ChannelUint32) ReduceString(acc string, f func(el uint32, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceUint

func (c ChannelUint32) ReduceUint(acc uint, f func(el uint32, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceUint16

func (c ChannelUint32) ReduceUint16(acc uint16, f func(el uint32, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceUint32

func (c ChannelUint32) ReduceUint32(acc uint32, f func(el uint32, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceUint64

func (c ChannelUint32) ReduceUint64(acc uint64, f func(el uint32, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ReduceUint8

func (c ChannelUint32) ReduceUint8(acc uint8, f func(el uint32, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint32) ScanBool

func (c ChannelUint32) ScanBool(acc bool, f func(el uint32, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanByte

func (c ChannelUint32) ScanByte(acc byte, f func(el uint32, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanError

func (c ChannelUint32) ScanError(acc error, f func(el uint32, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanFloat32

func (c ChannelUint32) ScanFloat32(acc float32, f func(el uint32, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanFloat64

func (c ChannelUint32) ScanFloat64(acc float64, f func(el uint32, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanInt

func (c ChannelUint32) ScanInt(acc int, f func(el uint32, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanInt16

func (c ChannelUint32) ScanInt16(acc int16, f func(el uint32, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanInt32

func (c ChannelUint32) ScanInt32(acc int32, f func(el uint32, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanInt64

func (c ChannelUint32) ScanInt64(acc int64, f func(el uint32, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanInt8

func (c ChannelUint32) ScanInt8(acc int8, f func(el uint32, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanInterface

func (c ChannelUint32) ScanInterface(acc interface{}, f func(el uint32, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanRune

func (c ChannelUint32) ScanRune(acc rune, f func(el uint32, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanString

func (c ChannelUint32) ScanString(acc string, f func(el uint32, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanUint

func (c ChannelUint32) ScanUint(acc uint, f func(el uint32, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanUint16

func (c ChannelUint32) ScanUint16(acc uint16, f func(el uint32, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanUint32

func (c ChannelUint32) ScanUint32(acc uint32, f func(el uint32, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanUint64

func (c ChannelUint32) ScanUint64(acc uint64, f func(el uint32, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) ScanUint8

func (c ChannelUint32) ScanUint8(acc uint8, f func(el uint32, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelUint32) Sum

func (c ChannelUint32) Sum() uint32

Sum returns sum of all elements from channel

func (ChannelUint32) Take

func (c ChannelUint32) Take(count int) chan uint32

Take takes first count elements from the channel.

func (ChannelUint32) Tee

func (c ChannelUint32) Tee(count int) []chan uint32

Tee returns 2 channels with elements from the input channel

func (ChannelUint32) ToSlice

func (c ChannelUint32) ToSlice() []uint32

ToSlice returns slice with all elements from channel.

type ChannelUint64

type ChannelUint64 struct {
	Data chan uint64
}

Channel is a set of operations with channel

func (ChannelUint64) All

func (c ChannelUint64) All(f func(el uint64) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelUint64) Any

func (c ChannelUint64) Any(f func(el uint64) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelUint64) ChunkEvery

func (c ChannelUint64) ChunkEvery(count int) chan []uint64

ChunkEvery returns channel with slices containing count elements each

func (ChannelUint64) Count

func (c ChannelUint64) Count(el uint64) int

Count return count of el occurences in channel.

func (ChannelUint64) Drop

func (c ChannelUint64) Drop(n int) chan uint64

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelUint64) Each

func (c ChannelUint64) Each(f func(el uint64))

Each calls f for every element in the channel

func (ChannelUint64) Filter

func (c ChannelUint64) Filter(f func(el uint64) bool) chan uint64

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelUint64) MapBool

func (c ChannelUint64) MapBool(f func(el uint64) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapByte

func (c ChannelUint64) MapByte(f func(el uint64) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapError

func (c ChannelUint64) MapError(f func(el uint64) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapFloat32

func (c ChannelUint64) MapFloat32(f func(el uint64) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapFloat64

func (c ChannelUint64) MapFloat64(f func(el uint64) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapInt

func (c ChannelUint64) MapInt(f func(el uint64) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapInt16

func (c ChannelUint64) MapInt16(f func(el uint64) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapInt32

func (c ChannelUint64) MapInt32(f func(el uint64) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapInt64

func (c ChannelUint64) MapInt64(f func(el uint64) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapInt8

func (c ChannelUint64) MapInt8(f func(el uint64) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapInterface

func (c ChannelUint64) MapInterface(f func(el uint64) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapRune

func (c ChannelUint64) MapRune(f func(el uint64) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapString

func (c ChannelUint64) MapString(f func(el uint64) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapUint

func (c ChannelUint64) MapUint(f func(el uint64) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapUint16

func (c ChannelUint64) MapUint16(f func(el uint64) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapUint32

func (c ChannelUint64) MapUint32(f func(el uint64) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapUint64

func (c ChannelUint64) MapUint64(f func(el uint64) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) MapUint8

func (c ChannelUint64) MapUint8(f func(el uint64) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint64) Max

func (c ChannelUint64) Max() (uint64, error)

Max returns the maximal element from channel

func (ChannelUint64) Min

func (c ChannelUint64) Min() (uint64, error)

Min returns the minimal element from channel

func (ChannelUint64) ReduceBool

func (c ChannelUint64) ReduceBool(acc bool, f func(el uint64, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceByte

func (c ChannelUint64) ReduceByte(acc byte, f func(el uint64, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceError

func (c ChannelUint64) ReduceError(acc error, f func(el uint64, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceFloat32

func (c ChannelUint64) ReduceFloat32(acc float32, f func(el uint64, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceFloat64

func (c ChannelUint64) ReduceFloat64(acc float64, f func(el uint64, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceInt

func (c ChannelUint64) ReduceInt(acc int, f func(el uint64, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceInt16

func (c ChannelUint64) ReduceInt16(acc int16, f func(el uint64, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceInt32

func (c ChannelUint64) ReduceInt32(acc int32, f func(el uint64, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceInt64

func (c ChannelUint64) ReduceInt64(acc int64, f func(el uint64, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceInt8

func (c ChannelUint64) ReduceInt8(acc int8, f func(el uint64, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceInterface

func (c ChannelUint64) ReduceInterface(acc interface{}, f func(el uint64, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceRune

func (c ChannelUint64) ReduceRune(acc rune, f func(el uint64, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceString

func (c ChannelUint64) ReduceString(acc string, f func(el uint64, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceUint

func (c ChannelUint64) ReduceUint(acc uint, f func(el uint64, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceUint16

func (c ChannelUint64) ReduceUint16(acc uint16, f func(el uint64, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceUint32

func (c ChannelUint64) ReduceUint32(acc uint32, f func(el uint64, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceUint64

func (c ChannelUint64) ReduceUint64(acc uint64, f func(el uint64, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ReduceUint8

func (c ChannelUint64) ReduceUint8(acc uint8, f func(el uint64, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint64) ScanBool

func (c ChannelUint64) ScanBool(acc bool, f func(el uint64, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanByte

func (c ChannelUint64) ScanByte(acc byte, f func(el uint64, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanError

func (c ChannelUint64) ScanError(acc error, f func(el uint64, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanFloat32

func (c ChannelUint64) ScanFloat32(acc float32, f func(el uint64, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanFloat64

func (c ChannelUint64) ScanFloat64(acc float64, f func(el uint64, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanInt

func (c ChannelUint64) ScanInt(acc int, f func(el uint64, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanInt16

func (c ChannelUint64) ScanInt16(acc int16, f func(el uint64, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanInt32

func (c ChannelUint64) ScanInt32(acc int32, f func(el uint64, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanInt64

func (c ChannelUint64) ScanInt64(acc int64, f func(el uint64, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanInt8

func (c ChannelUint64) ScanInt8(acc int8, f func(el uint64, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanInterface

func (c ChannelUint64) ScanInterface(acc interface{}, f func(el uint64, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanRune

func (c ChannelUint64) ScanRune(acc rune, f func(el uint64, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanString

func (c ChannelUint64) ScanString(acc string, f func(el uint64, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanUint

func (c ChannelUint64) ScanUint(acc uint, f func(el uint64, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanUint16

func (c ChannelUint64) ScanUint16(acc uint16, f func(el uint64, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanUint32

func (c ChannelUint64) ScanUint32(acc uint32, f func(el uint64, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanUint64

func (c ChannelUint64) ScanUint64(acc uint64, f func(el uint64, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) ScanUint8

func (c ChannelUint64) ScanUint8(acc uint8, f func(el uint64, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelUint64) Sum

func (c ChannelUint64) Sum() uint64

Sum returns sum of all elements from channel

func (ChannelUint64) Take

func (c ChannelUint64) Take(count int) chan uint64

Take takes first count elements from the channel.

func (ChannelUint64) Tee

func (c ChannelUint64) Tee(count int) []chan uint64

Tee returns 2 channels with elements from the input channel

func (ChannelUint64) ToSlice

func (c ChannelUint64) ToSlice() []uint64

ToSlice returns slice with all elements from channel.

type ChannelUint8

type ChannelUint8 struct {
	Data chan uint8
}

Channel is a set of operations with channel

func (ChannelUint8) All

func (c ChannelUint8) All(f func(el uint8) bool) bool

All returns true if f returns true for all elements in channel

func (ChannelUint8) Any

func (c ChannelUint8) Any(f func(el uint8) bool) bool

Any returns true if f returns true for any element in channel

func (ChannelUint8) ChunkEvery

func (c ChannelUint8) ChunkEvery(count int) chan []uint8

ChunkEvery returns channel with slices containing count elements each

func (ChannelUint8) Count

func (c ChannelUint8) Count(el uint8) int

Count return count of el occurences in channel.

func (ChannelUint8) Drop

func (c ChannelUint8) Drop(n int) chan uint8

Drop drops first n elements from channel c and returns a new channel with the rest. It returns channel do be unblocking. If you want array instead, wrap result into TakeAll.

func (ChannelUint8) Each

func (c ChannelUint8) Each(f func(el uint8))

Each calls f for every element in the channel

func (ChannelUint8) Filter

func (c ChannelUint8) Filter(f func(el uint8) bool) chan uint8

Filter returns a new channel with elements from input channel for which f returns true

func (ChannelUint8) MapBool

func (c ChannelUint8) MapBool(f func(el uint8) bool) chan bool

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapByte

func (c ChannelUint8) MapByte(f func(el uint8) byte) chan byte

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapError

func (c ChannelUint8) MapError(f func(el uint8) error) chan error

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapFloat32

func (c ChannelUint8) MapFloat32(f func(el uint8) float32) chan float32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapFloat64

func (c ChannelUint8) MapFloat64(f func(el uint8) float64) chan float64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapInt

func (c ChannelUint8) MapInt(f func(el uint8) int) chan int

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapInt16

func (c ChannelUint8) MapInt16(f func(el uint8) int16) chan int16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapInt32

func (c ChannelUint8) MapInt32(f func(el uint8) int32) chan int32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapInt64

func (c ChannelUint8) MapInt64(f func(el uint8) int64) chan int64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapInt8

func (c ChannelUint8) MapInt8(f func(el uint8) int8) chan int8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapInterface

func (c ChannelUint8) MapInterface(f func(el uint8) interface{}) chan interface{}

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapRune

func (c ChannelUint8) MapRune(f func(el uint8) rune) chan rune

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapString

func (c ChannelUint8) MapString(f func(el uint8) string) chan string

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapUint

func (c ChannelUint8) MapUint(f func(el uint8) uint) chan uint

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapUint16

func (c ChannelUint8) MapUint16(f func(el uint8) uint16) chan uint16

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapUint32

func (c ChannelUint8) MapUint32(f func(el uint8) uint32) chan uint32

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapUint64

func (c ChannelUint8) MapUint64(f func(el uint8) uint64) chan uint64

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) MapUint8

func (c ChannelUint8) MapUint8(f func(el uint8) uint8) chan uint8

Map applies f to all elements from channel and returns channel with results

func (ChannelUint8) Max

func (c ChannelUint8) Max() (uint8, error)

Max returns the maximal element from channel

func (ChannelUint8) Min

func (c ChannelUint8) Min() (uint8, error)

Min returns the minimal element from channel

func (ChannelUint8) ReduceBool

func (c ChannelUint8) ReduceBool(acc bool, f func(el uint8, acc bool) bool) bool

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceByte

func (c ChannelUint8) ReduceByte(acc byte, f func(el uint8, acc byte) byte) byte

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceError

func (c ChannelUint8) ReduceError(acc error, f func(el uint8, acc error) error) error

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceFloat32

func (c ChannelUint8) ReduceFloat32(acc float32, f func(el uint8, acc float32) float32) float32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceFloat64

func (c ChannelUint8) ReduceFloat64(acc float64, f func(el uint8, acc float64) float64) float64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceInt

func (c ChannelUint8) ReduceInt(acc int, f func(el uint8, acc int) int) int

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceInt16

func (c ChannelUint8) ReduceInt16(acc int16, f func(el uint8, acc int16) int16) int16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceInt32

func (c ChannelUint8) ReduceInt32(acc int32, f func(el uint8, acc int32) int32) int32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceInt64

func (c ChannelUint8) ReduceInt64(acc int64, f func(el uint8, acc int64) int64) int64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceInt8

func (c ChannelUint8) ReduceInt8(acc int8, f func(el uint8, acc int8) int8) int8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceInterface

func (c ChannelUint8) ReduceInterface(acc interface{}, f func(el uint8, acc interface{}) interface{}) interface{}

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceRune

func (c ChannelUint8) ReduceRune(acc rune, f func(el uint8, acc rune) rune) rune

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceString

func (c ChannelUint8) ReduceString(acc string, f func(el uint8, acc string) string) string

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceUint

func (c ChannelUint8) ReduceUint(acc uint, f func(el uint8, acc uint) uint) uint

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceUint16

func (c ChannelUint8) ReduceUint16(acc uint16, f func(el uint8, acc uint16) uint16) uint16

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceUint32

func (c ChannelUint8) ReduceUint32(acc uint32, f func(el uint8, acc uint32) uint32) uint32

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceUint64

func (c ChannelUint8) ReduceUint64(acc uint64, f func(el uint8, acc uint64) uint64) uint64

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ReduceUint8

func (c ChannelUint8) ReduceUint8(acc uint8, f func(el uint8, acc uint8) uint8) uint8

Reduce applies f to acc and every element from channel and returns acc

func (ChannelUint8) ScanBool

func (c ChannelUint8) ScanBool(acc bool, f func(el uint8, acc bool) bool) chan bool

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanByte

func (c ChannelUint8) ScanByte(acc byte, f func(el uint8, acc byte) byte) chan byte

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanError

func (c ChannelUint8) ScanError(acc error, f func(el uint8, acc error) error) chan error

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanFloat32

func (c ChannelUint8) ScanFloat32(acc float32, f func(el uint8, acc float32) float32) chan float32

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanFloat64

func (c ChannelUint8) ScanFloat64(acc float64, f func(el uint8, acc float64) float64) chan float64

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanInt

func (c ChannelUint8) ScanInt(acc int, f func(el uint8, acc int) int) chan int

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanInt16

func (c ChannelUint8) ScanInt16(acc int16, f func(el uint8, acc int16) int16) chan int16

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanInt32

func (c ChannelUint8) ScanInt32(acc int32, f func(el uint8, acc int32) int32) chan int32

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanInt64

func (c ChannelUint8) ScanInt64(acc int64, f func(el uint8, acc int64) int64) chan int64

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanInt8

func (c ChannelUint8) ScanInt8(acc int8, f func(el uint8, acc int8) int8) chan int8

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanInterface

func (c ChannelUint8) ScanInterface(acc interface{}, f func(el uint8, acc interface{}) interface{}) chan interface{}

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanRune

func (c ChannelUint8) ScanRune(acc rune, f func(el uint8, acc rune) rune) chan rune

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanString

func (c ChannelUint8) ScanString(acc string, f func(el uint8, acc string) string) chan string

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanUint

func (c ChannelUint8) ScanUint(acc uint, f func(el uint8, acc uint) uint) chan uint

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanUint16

func (c ChannelUint8) ScanUint16(acc uint16, f func(el uint8, acc uint16) uint16) chan uint16

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanUint32

func (c ChannelUint8) ScanUint32(acc uint32, f func(el uint8, acc uint32) uint32) chan uint32

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanUint64

func (c ChannelUint8) ScanUint64(acc uint64, f func(el uint8, acc uint64) uint64) chan uint64

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) ScanUint8

func (c ChannelUint8) ScanUint8(acc uint8, f func(el uint8, acc uint8) uint8) chan uint8

Scan is like Reduce, but returns slice of f results

func (ChannelUint8) Sum

func (c ChannelUint8) Sum() uint8

Sum returns sum of all elements from channel

func (ChannelUint8) Take

func (c ChannelUint8) Take(count int) chan uint8

Take takes first count elements from the channel.

func (ChannelUint8) Tee

func (c ChannelUint8) Tee(count int) []chan uint8

Tee returns 2 channels with elements from the input channel

func (ChannelUint8) ToSlice

func (c ChannelUint8) ToSlice() []uint8

ToSlice returns slice with all elements from channel.

type PairBool

type PairBool struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

type PairByte

type PairByte struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairByte) Max

func (PairByte) Max(a byte, b byte) byte

Max returns maximal value

func (PairByte) Min

func (PairByte) Min(a byte, b byte) byte

Min returns minimal value

type PairError

type PairError struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

type PairFloat32

type PairFloat32 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairFloat32) Max

func (PairFloat32) Max(a float32, b float32) float32

Max returns maximal value

func (PairFloat32) Min

func (PairFloat32) Min(a float32, b float32) float32

Min returns minimal value

type PairFloat64

type PairFloat64 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairFloat64) Max

func (PairFloat64) Max(a float64, b float64) float64

Max returns maximal value

func (PairFloat64) Min

func (PairFloat64) Min(a float64, b float64) float64

Min returns minimal value

type PairInt

type PairInt struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairInt) Max

func (PairInt) Max(a int, b int) int

Max returns maximal value

func (PairInt) Min

func (PairInt) Min(a int, b int) int

Min returns minimal value

type PairInt16

type PairInt16 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairInt16) Max

func (PairInt16) Max(a int16, b int16) int16

Max returns maximal value

func (PairInt16) Min

func (PairInt16) Min(a int16, b int16) int16

Min returns minimal value

type PairInt32

type PairInt32 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairInt32) Max

func (PairInt32) Max(a int32, b int32) int32

Max returns maximal value

func (PairInt32) Min

func (PairInt32) Min(a int32, b int32) int32

Min returns minimal value

type PairInt64

type PairInt64 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairInt64) Max

func (PairInt64) Max(a int64, b int64) int64

Max returns maximal value

func (PairInt64) Min

func (PairInt64) Min(a int64, b int64) int64

Min returns minimal value

type PairInt8

type PairInt8 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairInt8) Max

func (PairInt8) Max(a int8, b int8) int8

Max returns maximal value

func (PairInt8) Min

func (PairInt8) Min(a int8, b int8) int8

Min returns minimal value

type PairInterface

type PairInterface struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

type PairRune

type PairRune struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairRune) Max

func (PairRune) Max(a rune, b rune) rune

Max returns maximal value

func (PairRune) Min

func (PairRune) Min(a rune, b rune) rune

Min returns minimal value

type PairString

type PairString struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairString) Max

func (PairString) Max(a string, b string) string

Max returns maximal value

func (PairString) Min

func (PairString) Min(a string, b string) string

Min returns minimal value

type PairUint

type PairUint struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairUint) Max

func (PairUint) Max(a uint, b uint) uint

Max returns maximal value

func (PairUint) Min

func (PairUint) Min(a uint, b uint) uint

Min returns minimal value

type PairUint16

type PairUint16 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairUint16) Max

func (PairUint16) Max(a uint16, b uint16) uint16

Max returns maximal value

func (PairUint16) Min

func (PairUint16) Min(a uint16, b uint16) uint16

Min returns minimal value

type PairUint32

type PairUint32 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairUint32) Max

func (PairUint32) Max(a uint32, b uint32) uint32

Max returns maximal value

func (PairUint32) Min

func (PairUint32) Min(a uint32, b uint32) uint32

Min returns minimal value

type PairUint64

type PairUint64 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairUint64) Max

func (PairUint64) Max(a uint64, b uint64) uint64

Max returns maximal value

func (PairUint64) Min

func (PairUint64) Min(a uint64, b uint64) uint64

Min returns minimal value

type PairUint8

type PairUint8 struct {
}

Pair is a set of functions for 2 values that you can pass into reduce-like funcs

func (PairUint8) Max

func (PairUint8) Max(a uint8, b uint8) uint8

Max returns maximal value

func (PairUint8) Min

func (PairUint8) Min(a uint8, b uint8) uint8

Min returns minimal value

type SequenceBool

type SequenceBool struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceBool) Iterate

func (s SequenceBool) Iterate(val bool, f func(val bool) bool) chan bool

Iterate returns an infinite list of repeated applications of f to val

func (SequenceBool) Repeat

func (s SequenceBool) Repeat(val bool) chan bool

Repeat returns channel that produces val infinite times

func (SequenceBool) Replicate

func (s SequenceBool) Replicate(val bool, n int) chan bool

Replicate returns channel that produces val n times

type SequenceByte

type SequenceByte struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceByte) Iterate

func (s SequenceByte) Iterate(val byte, f func(val byte) byte) chan byte

Iterate returns an infinite list of repeated applications of f to val

func (SequenceByte) Repeat

func (s SequenceByte) Repeat(val byte) chan byte

Repeat returns channel that produces val infinite times

func (SequenceByte) Replicate

func (s SequenceByte) Replicate(val byte, n int) chan byte

Replicate returns channel that produces val n times

type SequenceError

type SequenceError struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceError) Iterate

func (s SequenceError) Iterate(val error, f func(val error) error) chan error

Iterate returns an infinite list of repeated applications of f to val

func (SequenceError) Repeat

func (s SequenceError) Repeat(val error) chan error

Repeat returns channel that produces val infinite times

func (SequenceError) Replicate

func (s SequenceError) Replicate(val error, n int) chan error

Replicate returns channel that produces val n times

type SequenceFloat32

type SequenceFloat32 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceFloat32) Count

func (s SequenceFloat32) Count(start float32, step float32) chan float32

Count is like Range, but infinite

func (SequenceFloat32) Exponential

func (s SequenceFloat32) Exponential(start float32, factor float32) chan float32

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceFloat32) Iterate

func (s SequenceFloat32) Iterate(val float32, f func(val float32) float32) chan float32

Iterate returns an infinite list of repeated applications of f to val

func (SequenceFloat32) Range

func (s SequenceFloat32) Range(start float32, end float32, step float32) chan float32

Range generates elements from start to end with given step

func (SequenceFloat32) Repeat

func (s SequenceFloat32) Repeat(val float32) chan float32

Repeat returns channel that produces val infinite times

func (SequenceFloat32) Replicate

func (s SequenceFloat32) Replicate(val float32, n int) chan float32

Replicate returns channel that produces val n times

type SequenceFloat64

type SequenceFloat64 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceFloat64) Count

func (s SequenceFloat64) Count(start float64, step float64) chan float64

Count is like Range, but infinite

func (SequenceFloat64) Exponential

func (s SequenceFloat64) Exponential(start float64, factor float64) chan float64

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceFloat64) Iterate

func (s SequenceFloat64) Iterate(val float64, f func(val float64) float64) chan float64

Iterate returns an infinite list of repeated applications of f to val

func (SequenceFloat64) Range

func (s SequenceFloat64) Range(start float64, end float64, step float64) chan float64

Range generates elements from start to end with given step

func (SequenceFloat64) Repeat

func (s SequenceFloat64) Repeat(val float64) chan float64

Repeat returns channel that produces val infinite times

func (SequenceFloat64) Replicate

func (s SequenceFloat64) Replicate(val float64, n int) chan float64

Replicate returns channel that produces val n times

type SequenceInt

type SequenceInt struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceInt) Count

func (s SequenceInt) Count(start int, step int) chan int

Count is like Range, but infinite

func (SequenceInt) Exponential

func (s SequenceInt) Exponential(start int, factor int) chan int

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceInt) Iterate

func (s SequenceInt) Iterate(val int, f func(val int) int) chan int

Iterate returns an infinite list of repeated applications of f to val

func (SequenceInt) Range

func (s SequenceInt) Range(start int, end int, step int) chan int

Range generates elements from start to end with given step

func (SequenceInt) Repeat

func (s SequenceInt) Repeat(val int) chan int

Repeat returns channel that produces val infinite times

func (SequenceInt) Replicate

func (s SequenceInt) Replicate(val int, n int) chan int

Replicate returns channel that produces val n times

type SequenceInt16

type SequenceInt16 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceInt16) Count

func (s SequenceInt16) Count(start int16, step int16) chan int16

Count is like Range, but infinite

func (SequenceInt16) Exponential

func (s SequenceInt16) Exponential(start int16, factor int16) chan int16

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceInt16) Iterate

func (s SequenceInt16) Iterate(val int16, f func(val int16) int16) chan int16

Iterate returns an infinite list of repeated applications of f to val

func (SequenceInt16) Range

func (s SequenceInt16) Range(start int16, end int16, step int16) chan int16

Range generates elements from start to end with given step

func (SequenceInt16) Repeat

func (s SequenceInt16) Repeat(val int16) chan int16

Repeat returns channel that produces val infinite times

func (SequenceInt16) Replicate

func (s SequenceInt16) Replicate(val int16, n int) chan int16

Replicate returns channel that produces val n times

type SequenceInt32

type SequenceInt32 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceInt32) Count

func (s SequenceInt32) Count(start int32, step int32) chan int32

Count is like Range, but infinite

func (SequenceInt32) Exponential

func (s SequenceInt32) Exponential(start int32, factor int32) chan int32

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceInt32) Iterate

func (s SequenceInt32) Iterate(val int32, f func(val int32) int32) chan int32

Iterate returns an infinite list of repeated applications of f to val

func (SequenceInt32) Range

func (s SequenceInt32) Range(start int32, end int32, step int32) chan int32

Range generates elements from start to end with given step

func (SequenceInt32) Repeat

func (s SequenceInt32) Repeat(val int32) chan int32

Repeat returns channel that produces val infinite times

func (SequenceInt32) Replicate

func (s SequenceInt32) Replicate(val int32, n int) chan int32

Replicate returns channel that produces val n times

type SequenceInt64

type SequenceInt64 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceInt64) Count

func (s SequenceInt64) Count(start int64, step int64) chan int64

Count is like Range, but infinite

func (SequenceInt64) Exponential

func (s SequenceInt64) Exponential(start int64, factor int64) chan int64

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceInt64) Iterate

func (s SequenceInt64) Iterate(val int64, f func(val int64) int64) chan int64

Iterate returns an infinite list of repeated applications of f to val

func (SequenceInt64) Range

func (s SequenceInt64) Range(start int64, end int64, step int64) chan int64

Range generates elements from start to end with given step

func (SequenceInt64) Repeat

func (s SequenceInt64) Repeat(val int64) chan int64

Repeat returns channel that produces val infinite times

func (SequenceInt64) Replicate

func (s SequenceInt64) Replicate(val int64, n int) chan int64

Replicate returns channel that produces val n times

type SequenceInt8

type SequenceInt8 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceInt8) Count

func (s SequenceInt8) Count(start int8, step int8) chan int8

Count is like Range, but infinite

func (SequenceInt8) Exponential

func (s SequenceInt8) Exponential(start int8, factor int8) chan int8

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceInt8) Iterate

func (s SequenceInt8) Iterate(val int8, f func(val int8) int8) chan int8

Iterate returns an infinite list of repeated applications of f to val

func (SequenceInt8) Range

func (s SequenceInt8) Range(start int8, end int8, step int8) chan int8

Range generates elements from start to end with given step

func (SequenceInt8) Repeat

func (s SequenceInt8) Repeat(val int8) chan int8

Repeat returns channel that produces val infinite times

func (SequenceInt8) Replicate

func (s SequenceInt8) Replicate(val int8, n int) chan int8

Replicate returns channel that produces val n times

type SequenceInterface

type SequenceInterface struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceInterface) Iterate

func (s SequenceInterface) Iterate(val interface{}, f func(val interface{}) interface{}) chan interface{}

Iterate returns an infinite list of repeated applications of f to val

func (SequenceInterface) Repeat

func (s SequenceInterface) Repeat(val interface{}) chan interface{}

Repeat returns channel that produces val infinite times

func (SequenceInterface) Replicate

func (s SequenceInterface) Replicate(val interface{}, n int) chan interface{}

Replicate returns channel that produces val n times

type SequenceRune

type SequenceRune struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceRune) Count

func (s SequenceRune) Count(start rune, step rune) chan rune

Count is like Range, but infinite

func (SequenceRune) Exponential

func (s SequenceRune) Exponential(start rune, factor rune) chan rune

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceRune) Iterate

func (s SequenceRune) Iterate(val rune, f func(val rune) rune) chan rune

Iterate returns an infinite list of repeated applications of f to val

func (SequenceRune) Range

func (s SequenceRune) Range(start rune, end rune, step rune) chan rune

Range generates elements from start to end with given step

func (SequenceRune) Repeat

func (s SequenceRune) Repeat(val rune) chan rune

Repeat returns channel that produces val infinite times

func (SequenceRune) Replicate

func (s SequenceRune) Replicate(val rune, n int) chan rune

Replicate returns channel that produces val n times

type SequenceString

type SequenceString struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceString) Iterate

func (s SequenceString) Iterate(val string, f func(val string) string) chan string

Iterate returns an infinite list of repeated applications of f to val

func (SequenceString) Repeat

func (s SequenceString) Repeat(val string) chan string

Repeat returns channel that produces val infinite times

func (SequenceString) Replicate

func (s SequenceString) Replicate(val string, n int) chan string

Replicate returns channel that produces val n times

type SequenceUint

type SequenceUint struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceUint) Count

func (s SequenceUint) Count(start uint, step uint) chan uint

Count is like Range, but infinite

func (SequenceUint) Exponential

func (s SequenceUint) Exponential(start uint, factor uint) chan uint

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceUint) Iterate

func (s SequenceUint) Iterate(val uint, f func(val uint) uint) chan uint

Iterate returns an infinite list of repeated applications of f to val

func (SequenceUint) Range

func (s SequenceUint) Range(start uint, end uint, step uint) chan uint

Range generates elements from start to end with given step

func (SequenceUint) Repeat

func (s SequenceUint) Repeat(val uint) chan uint

Repeat returns channel that produces val infinite times

func (SequenceUint) Replicate

func (s SequenceUint) Replicate(val uint, n int) chan uint

Replicate returns channel that produces val n times

type SequenceUint16

type SequenceUint16 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceUint16) Count

func (s SequenceUint16) Count(start uint16, step uint16) chan uint16

Count is like Range, but infinite

func (SequenceUint16) Exponential

func (s SequenceUint16) Exponential(start uint16, factor uint16) chan uint16

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceUint16) Iterate

func (s SequenceUint16) Iterate(val uint16, f func(val uint16) uint16) chan uint16

Iterate returns an infinite list of repeated applications of f to val

func (SequenceUint16) Range

func (s SequenceUint16) Range(start uint16, end uint16, step uint16) chan uint16

Range generates elements from start to end with given step

func (SequenceUint16) Repeat

func (s SequenceUint16) Repeat(val uint16) chan uint16

Repeat returns channel that produces val infinite times

func (SequenceUint16) Replicate

func (s SequenceUint16) Replicate(val uint16, n int) chan uint16

Replicate returns channel that produces val n times

type SequenceUint32

type SequenceUint32 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceUint32) Count

func (s SequenceUint32) Count(start uint32, step uint32) chan uint32

Count is like Range, but infinite

func (SequenceUint32) Exponential

func (s SequenceUint32) Exponential(start uint32, factor uint32) chan uint32

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceUint32) Iterate

func (s SequenceUint32) Iterate(val uint32, f func(val uint32) uint32) chan uint32

Iterate returns an infinite list of repeated applications of f to val

func (SequenceUint32) Range

func (s SequenceUint32) Range(start uint32, end uint32, step uint32) chan uint32

Range generates elements from start to end with given step

func (SequenceUint32) Repeat

func (s SequenceUint32) Repeat(val uint32) chan uint32

Repeat returns channel that produces val infinite times

func (SequenceUint32) Replicate

func (s SequenceUint32) Replicate(val uint32, n int) chan uint32

Replicate returns channel that produces val n times

type SequenceUint64

type SequenceUint64 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceUint64) Count

func (s SequenceUint64) Count(start uint64, step uint64) chan uint64

Count is like Range, but infinite

func (SequenceUint64) Exponential

func (s SequenceUint64) Exponential(start uint64, factor uint64) chan uint64

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceUint64) Iterate

func (s SequenceUint64) Iterate(val uint64, f func(val uint64) uint64) chan uint64

Iterate returns an infinite list of repeated applications of f to val

func (SequenceUint64) Range

func (s SequenceUint64) Range(start uint64, end uint64, step uint64) chan uint64

Range generates elements from start to end with given step

func (SequenceUint64) Repeat

func (s SequenceUint64) Repeat(val uint64) chan uint64

Repeat returns channel that produces val infinite times

func (SequenceUint64) Replicate

func (s SequenceUint64) Replicate(val uint64, n int) chan uint64

Replicate returns channel that produces val n times

type SequenceUint8

type SequenceUint8 struct {
	// contains filtered or unexported fields
}

Sequence is a set of operations to generate sequences

func (SequenceUint8) Count

func (s SequenceUint8) Count(start uint8, step uint8) chan uint8

Count is like Range, but infinite

func (SequenceUint8) Exponential

func (s SequenceUint8) Exponential(start uint8, factor uint8) chan uint8

Exponential generates elements from start with multiplication of value on factor on every step

func (SequenceUint8) Iterate

func (s SequenceUint8) Iterate(val uint8, f func(val uint8) uint8) chan uint8

Iterate returns an infinite list of repeated applications of f to val

func (SequenceUint8) Range

func (s SequenceUint8) Range(start uint8, end uint8, step uint8) chan uint8

Range generates elements from start to end with given step

func (SequenceUint8) Repeat

func (s SequenceUint8) Repeat(val uint8) chan uint8

Repeat returns channel that produces val infinite times

func (SequenceUint8) Replicate

func (s SequenceUint8) Replicate(val uint8, n int) chan uint8

Replicate returns channel that produces val n times

type SliceBool

type SliceBool struct {
	Data []bool
}

Slice is a set of operations to work with slice

func (SliceBool) All

func (s SliceBool) All(f func(el bool) bool) bool

All returns true if f returns true for all elements in arr

func (SliceBool) Any

func (s SliceBool) Any(f func(el bool) bool) bool

Any returns true if f returns true for any element in arr

func (SliceBool) Choice

func (s SliceBool) Choice(seed int64) (bool, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceBool) ChunkByBool

func (s SliceBool) ChunkByBool(f func(el bool) bool) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByByte

func (s SliceBool) ChunkByByte(f func(el bool) byte) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByError

func (s SliceBool) ChunkByError(f func(el bool) error) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByFloat32

func (s SliceBool) ChunkByFloat32(f func(el bool) float32) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByFloat64

func (s SliceBool) ChunkByFloat64(f func(el bool) float64) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByInt

func (s SliceBool) ChunkByInt(f func(el bool) int) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByInt16

func (s SliceBool) ChunkByInt16(f func(el bool) int16) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByInt32

func (s SliceBool) ChunkByInt32(f func(el bool) int32) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByInt64

func (s SliceBool) ChunkByInt64(f func(el bool) int64) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByInt8

func (s SliceBool) ChunkByInt8(f func(el bool) int8) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByInterface

func (s SliceBool) ChunkByInterface(f func(el bool) interface{}) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByRune

func (s SliceBool) ChunkByRune(f func(el bool) rune) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByString

func (s SliceBool) ChunkByString(f func(el bool) string) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByUint

func (s SliceBool) ChunkByUint(f func(el bool) uint) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByUint16

func (s SliceBool) ChunkByUint16(f func(el bool) uint16) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByUint32

func (s SliceBool) ChunkByUint32(f func(el bool) uint32) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByUint64

func (s SliceBool) ChunkByUint64(f func(el bool) uint64) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkByUint8

func (s SliceBool) ChunkByUint8(f func(el bool) uint8) [][]bool

ChunkBy splits arr on every element for which f returns a new value.

func (SliceBool) ChunkEvery

func (s SliceBool) ChunkEvery(count int) ([][]bool, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceBool) Contains

func (s SliceBool) Contains(el bool) bool

Contains returns true if el in arr.

func (SliceBool) Count

func (s SliceBool) Count(el bool) int

Count return count of el occurences in arr.

func (SliceBool) CountBy

func (s SliceBool) CountBy(f func(el bool) bool) int

CountBy returns how many times f returns true.

func (SliceBool) Cycle

func (s SliceBool) Cycle() chan bool

Cycle is an infinite loop over slice

func (SliceBool) Dedup

func (s SliceBool) Dedup() []bool

Dedup returns a given slice without consecutive duplicated elements

func (SliceBool) DedupByBool

func (s SliceBool) DedupByBool(f func(el bool) bool) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByByte

func (s SliceBool) DedupByByte(f func(el bool) byte) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByError

func (s SliceBool) DedupByError(f func(el bool) error) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByFloat32

func (s SliceBool) DedupByFloat32(f func(el bool) float32) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByFloat64

func (s SliceBool) DedupByFloat64(f func(el bool) float64) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByInt

func (s SliceBool) DedupByInt(f func(el bool) int) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByInt16

func (s SliceBool) DedupByInt16(f func(el bool) int16) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByInt32

func (s SliceBool) DedupByInt32(f func(el bool) int32) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByInt64

func (s SliceBool) DedupByInt64(f func(el bool) int64) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByInt8

func (s SliceBool) DedupByInt8(f func(el bool) int8) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByInterface

func (s SliceBool) DedupByInterface(f func(el bool) interface{}) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByRune

func (s SliceBool) DedupByRune(f func(el bool) rune) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByString

func (s SliceBool) DedupByString(f func(el bool) string) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByUint

func (s SliceBool) DedupByUint(f func(el bool) uint) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByUint16

func (s SliceBool) DedupByUint16(f func(el bool) uint16) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByUint32

func (s SliceBool) DedupByUint32(f func(el bool) uint32) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByUint64

func (s SliceBool) DedupByUint64(f func(el bool) uint64) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) DedupByUint8

func (s SliceBool) DedupByUint8(f func(el bool) uint8) []bool

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceBool) Delete

func (s SliceBool) Delete(element bool) []bool

Delete deletes the first occurence of the element from the slice

func (SliceBool) DeleteAll

func (s SliceBool) DeleteAll(element bool) []bool

DeleteAll deletes all occurences of the element from the slice

func (SliceBool) DeleteAt

func (s SliceBool) DeleteAt(indices ...int) ([]bool, error)

DeleteAt returns the slice without elements on given positions

func (SliceBool) DropEvery

func (s SliceBool) DropEvery(nth int, from int) ([]bool, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceBool) DropWhile

func (s SliceBool) DropWhile(f func(el bool) bool) []bool

DropWhile drops elements from arr while f returns true

func (SliceBool) Each

func (s SliceBool) Each(f func(el bool))

Each calls f for every element from arr

func (SliceBool) EndsWith

func (s SliceBool) EndsWith(suffix []bool) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceBool) Equal

func (s SliceBool) Equal(other []bool) bool

Equal returns true if slices are equal

func (SliceBool) Filter

func (s SliceBool) Filter(f func(el bool) bool) []bool

Filter returns slice of T for which F returned true

func (SliceBool) Find

func (s SliceBool) Find(f func(el bool) bool) (bool, error)

Find returns the first element for which f returns true

func (SliceBool) FindIndex

func (s SliceBool) FindIndex(f func(el bool) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceBool) GroupByBool

func (s SliceBool) GroupByBool(f func(el bool) bool) map[bool][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByByte

func (s SliceBool) GroupByByte(f func(el bool) byte) map[byte][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByError

func (s SliceBool) GroupByError(f func(el bool) error) map[error][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByFloat32

func (s SliceBool) GroupByFloat32(f func(el bool) float32) map[float32][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByFloat64

func (s SliceBool) GroupByFloat64(f func(el bool) float64) map[float64][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByInt

func (s SliceBool) GroupByInt(f func(el bool) int) map[int][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByInt16

func (s SliceBool) GroupByInt16(f func(el bool) int16) map[int16][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByInt32

func (s SliceBool) GroupByInt32(f func(el bool) int32) map[int32][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByInt64

func (s SliceBool) GroupByInt64(f func(el bool) int64) map[int64][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByInt8

func (s SliceBool) GroupByInt8(f func(el bool) int8) map[int8][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByInterface

func (s SliceBool) GroupByInterface(f func(el bool) interface{}) map[interface{}][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByRune

func (s SliceBool) GroupByRune(f func(el bool) rune) map[rune][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByString

func (s SliceBool) GroupByString(f func(el bool) string) map[string][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByUint

func (s SliceBool) GroupByUint(f func(el bool) uint) map[uint][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByUint16

func (s SliceBool) GroupByUint16(f func(el bool) uint16) map[uint16][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByUint32

func (s SliceBool) GroupByUint32(f func(el bool) uint32) map[uint32][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByUint64

func (s SliceBool) GroupByUint64(f func(el bool) uint64) map[uint64][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) GroupByUint8

func (s SliceBool) GroupByUint8(f func(el bool) uint8) map[uint8][]bool

GroupBy groups element from array by value returned by f

func (SliceBool) InsertAt

func (s SliceBool) InsertAt(index int, element bool) ([]bool, error)

InsertAt returns the slice with element inserted at given index.

func (SliceBool) Intersperse

func (s SliceBool) Intersperse(el bool) []bool

Intersperse inserts el between each element of arr

func (SliceBool) Last

func (s SliceBool) Last() (bool, error)

Last returns the last element from the slice

func (SliceBool) MapBool

func (s SliceBool) MapBool(f func(el bool) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapByte

func (s SliceBool) MapByte(f func(el bool) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapError

func (s SliceBool) MapError(f func(el bool) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapFloat32

func (s SliceBool) MapFloat32(f func(el bool) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapFloat64

func (s SliceBool) MapFloat64(f func(el bool) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapInt

func (s SliceBool) MapInt(f func(el bool) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapInt16

func (s SliceBool) MapInt16(f func(el bool) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapInt32

func (s SliceBool) MapInt32(f func(el bool) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapInt64

func (s SliceBool) MapInt64(f func(el bool) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapInt8

func (s SliceBool) MapInt8(f func(el bool) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapInterface

func (s SliceBool) MapInterface(f func(el bool) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapRune

func (s SliceBool) MapRune(f func(el bool) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapString

func (s SliceBool) MapString(f func(el bool) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapUint

func (s SliceBool) MapUint(f func(el bool) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapUint16

func (s SliceBool) MapUint16(f func(el bool) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapUint32

func (s SliceBool) MapUint32(f func(el bool) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapUint64

func (s SliceBool) MapUint64(f func(el bool) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) MapUint8

func (s SliceBool) MapUint8(f func(el bool) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceBool) Permutations

func (s SliceBool) Permutations(size int) chan []bool

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceBool) Product

func (s SliceBool) Product(repeat int) chan []bool

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceBool) ReduceBool

func (s SliceBool) ReduceBool(acc bool, f func(el bool, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceByte

func (s SliceBool) ReduceByte(acc byte, f func(el bool, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceError

func (s SliceBool) ReduceError(acc error, f func(el bool, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceFloat32

func (s SliceBool) ReduceFloat32(acc float32, f func(el bool, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceFloat64

func (s SliceBool) ReduceFloat64(acc float64, f func(el bool, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceInt

func (s SliceBool) ReduceInt(acc int, f func(el bool, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceInt16

func (s SliceBool) ReduceInt16(acc int16, f func(el bool, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceInt32

func (s SliceBool) ReduceInt32(acc int32, f func(el bool, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceInt64

func (s SliceBool) ReduceInt64(acc int64, f func(el bool, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceInt8

func (s SliceBool) ReduceInt8(acc int8, f func(el bool, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceInterface

func (s SliceBool) ReduceInterface(acc interface{}, f func(el bool, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceRune

func (s SliceBool) ReduceRune(acc rune, f func(el bool, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceString

func (s SliceBool) ReduceString(acc string, f func(el bool, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceUint

func (s SliceBool) ReduceUint(acc uint, f func(el bool, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceUint16

func (s SliceBool) ReduceUint16(acc uint16, f func(el bool, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceUint32

func (s SliceBool) ReduceUint32(acc uint32, f func(el bool, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceUint64

func (s SliceBool) ReduceUint64(acc uint64, f func(el bool, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceUint8

func (s SliceBool) ReduceUint8(acc uint8, f func(el bool, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceBool) ReduceWhileBool

func (s SliceBool) ReduceWhileBool(acc bool, f func(el bool, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileByte

func (s SliceBool) ReduceWhileByte(acc byte, f func(el bool, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileError

func (s SliceBool) ReduceWhileError(acc error, f func(el bool, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileFloat32

func (s SliceBool) ReduceWhileFloat32(acc float32, f func(el bool, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileFloat64

func (s SliceBool) ReduceWhileFloat64(acc float64, f func(el bool, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileInt

func (s SliceBool) ReduceWhileInt(acc int, f func(el bool, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileInt16

func (s SliceBool) ReduceWhileInt16(acc int16, f func(el bool, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileInt32

func (s SliceBool) ReduceWhileInt32(acc int32, f func(el bool, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileInt64

func (s SliceBool) ReduceWhileInt64(acc int64, f func(el bool, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileInt8

func (s SliceBool) ReduceWhileInt8(acc int8, f func(el bool, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileInterface

func (s SliceBool) ReduceWhileInterface(acc interface{}, f func(el bool, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileRune

func (s SliceBool) ReduceWhileRune(acc rune, f func(el bool, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileString

func (s SliceBool) ReduceWhileString(acc string, f func(el bool, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileUint

func (s SliceBool) ReduceWhileUint(acc uint, f func(el bool, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileUint16

func (s SliceBool) ReduceWhileUint16(acc uint16, f func(el bool, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileUint32

func (s SliceBool) ReduceWhileUint32(acc uint32, f func(el bool, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileUint64

func (s SliceBool) ReduceWhileUint64(acc uint64, f func(el bool, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) ReduceWhileUint8

func (s SliceBool) ReduceWhileUint8(acc uint8, f func(el bool, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceBool) Reverse

func (s SliceBool) Reverse() []bool

Reverse returns given arr in reversed order

func (SliceBool) Same

func (s SliceBool) Same() bool

Same returns true if all element in arr the same

func (SliceBool) ScanBool

func (s SliceBool) ScanBool(acc bool, f func(el bool, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanByte

func (s SliceBool) ScanByte(acc byte, f func(el bool, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanError

func (s SliceBool) ScanError(acc error, f func(el bool, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanFloat32

func (s SliceBool) ScanFloat32(acc float32, f func(el bool, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanFloat64

func (s SliceBool) ScanFloat64(acc float64, f func(el bool, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanInt

func (s SliceBool) ScanInt(acc int, f func(el bool, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanInt16

func (s SliceBool) ScanInt16(acc int16, f func(el bool, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanInt32

func (s SliceBool) ScanInt32(acc int32, f func(el bool, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanInt64

func (s SliceBool) ScanInt64(acc int64, f func(el bool, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanInt8

func (s SliceBool) ScanInt8(acc int8, f func(el bool, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanInterface

func (s SliceBool) ScanInterface(acc interface{}, f func(el bool, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanRune

func (s SliceBool) ScanRune(acc rune, f func(el bool, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanString

func (s SliceBool) ScanString(acc string, f func(el bool, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanUint

func (s SliceBool) ScanUint(acc uint, f func(el bool, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanUint16

func (s SliceBool) ScanUint16(acc uint16, f func(el bool, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanUint32

func (s SliceBool) ScanUint32(acc uint32, f func(el bool, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanUint64

func (s SliceBool) ScanUint64(acc uint64, f func(el bool, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceBool) ScanUint8

func (s SliceBool) ScanUint8(acc uint8, f func(el bool, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceBool) Shuffle

func (s SliceBool) Shuffle(seed int64) []bool

Shuffle in random order arr elements

func (SliceBool) Split

func (s SliceBool) Split(sep bool) [][]bool

Split splits arr by sep

func (SliceBool) StartsWith

func (s SliceBool) StartsWith(prefix []bool) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceBool) TakeEvery

func (s SliceBool) TakeEvery(nth int, from int) ([]bool, error)

TakeEvery returns slice of every nth elements

func (SliceBool) TakeRandom

func (s SliceBool) TakeRandom(count int, seed int64) ([]bool, error)

TakeRandom returns slice of count random elements from the slice

func (SliceBool) TakeWhile

func (s SliceBool) TakeWhile(f func(el bool) bool) []bool

TakeWhile takes elements from arr while f returns true

func (SliceBool) ToChannel

func (s SliceBool) ToChannel() chan bool

ToChannel returns channel with elements from the slice

func (SliceBool) Uniq

func (s SliceBool) Uniq() []bool

Uniq returns arr with only first occurences of every element.

func (SliceBool) Window

func (s SliceBool) Window(size int) ([][]bool, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceBool) Without

func (s SliceBool) Without(elements ...bool) []bool

Without returns the slice with filtered out element

type SliceByte

type SliceByte struct {
	Data []byte
}

Slice is a set of operations to work with slice

func (SliceByte) All

func (s SliceByte) All(f func(el byte) bool) bool

All returns true if f returns true for all elements in arr

func (SliceByte) Any

func (s SliceByte) Any(f func(el byte) bool) bool

Any returns true if f returns true for any element in arr

func (SliceByte) Choice

func (s SliceByte) Choice(seed int64) (byte, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceByte) ChunkByBool

func (s SliceByte) ChunkByBool(f func(el byte) bool) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByByte

func (s SliceByte) ChunkByByte(f func(el byte) byte) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByError

func (s SliceByte) ChunkByError(f func(el byte) error) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByFloat32

func (s SliceByte) ChunkByFloat32(f func(el byte) float32) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByFloat64

func (s SliceByte) ChunkByFloat64(f func(el byte) float64) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByInt

func (s SliceByte) ChunkByInt(f func(el byte) int) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByInt16

func (s SliceByte) ChunkByInt16(f func(el byte) int16) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByInt32

func (s SliceByte) ChunkByInt32(f func(el byte) int32) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByInt64

func (s SliceByte) ChunkByInt64(f func(el byte) int64) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByInt8

func (s SliceByte) ChunkByInt8(f func(el byte) int8) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByInterface

func (s SliceByte) ChunkByInterface(f func(el byte) interface{}) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByRune

func (s SliceByte) ChunkByRune(f func(el byte) rune) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByString

func (s SliceByte) ChunkByString(f func(el byte) string) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByUint

func (s SliceByte) ChunkByUint(f func(el byte) uint) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByUint16

func (s SliceByte) ChunkByUint16(f func(el byte) uint16) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByUint32

func (s SliceByte) ChunkByUint32(f func(el byte) uint32) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByUint64

func (s SliceByte) ChunkByUint64(f func(el byte) uint64) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkByUint8

func (s SliceByte) ChunkByUint8(f func(el byte) uint8) [][]byte

ChunkBy splits arr on every element for which f returns a new value.

func (SliceByte) ChunkEvery

func (s SliceByte) ChunkEvery(count int) ([][]byte, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceByte) Contains

func (s SliceByte) Contains(el byte) bool

Contains returns true if el in arr.

func (SliceByte) Count

func (s SliceByte) Count(el byte) int

Count return count of el occurences in arr.

func (SliceByte) CountBy

func (s SliceByte) CountBy(f func(el byte) bool) int

CountBy returns how many times f returns true.

func (SliceByte) Cycle

func (s SliceByte) Cycle() chan byte

Cycle is an infinite loop over slice

func (SliceByte) Dedup

func (s SliceByte) Dedup() []byte

Dedup returns a given slice without consecutive duplicated elements

func (SliceByte) DedupByBool

func (s SliceByte) DedupByBool(f func(el byte) bool) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByByte

func (s SliceByte) DedupByByte(f func(el byte) byte) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByError

func (s SliceByte) DedupByError(f func(el byte) error) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByFloat32

func (s SliceByte) DedupByFloat32(f func(el byte) float32) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByFloat64

func (s SliceByte) DedupByFloat64(f func(el byte) float64) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByInt

func (s SliceByte) DedupByInt(f func(el byte) int) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByInt16

func (s SliceByte) DedupByInt16(f func(el byte) int16) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByInt32

func (s SliceByte) DedupByInt32(f func(el byte) int32) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByInt64

func (s SliceByte) DedupByInt64(f func(el byte) int64) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByInt8

func (s SliceByte) DedupByInt8(f func(el byte) int8) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByInterface

func (s SliceByte) DedupByInterface(f func(el byte) interface{}) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByRune

func (s SliceByte) DedupByRune(f func(el byte) rune) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByString

func (s SliceByte) DedupByString(f func(el byte) string) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByUint

func (s SliceByte) DedupByUint(f func(el byte) uint) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByUint16

func (s SliceByte) DedupByUint16(f func(el byte) uint16) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByUint32

func (s SliceByte) DedupByUint32(f func(el byte) uint32) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByUint64

func (s SliceByte) DedupByUint64(f func(el byte) uint64) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) DedupByUint8

func (s SliceByte) DedupByUint8(f func(el byte) uint8) []byte

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceByte) Delete

func (s SliceByte) Delete(element byte) []byte

Delete deletes the first occurence of the element from the slice

func (SliceByte) DeleteAll

func (s SliceByte) DeleteAll(element byte) []byte

DeleteAll deletes all occurences of the element from the slice

func (SliceByte) DeleteAt

func (s SliceByte) DeleteAt(indices ...int) ([]byte, error)

DeleteAt returns the slice without elements on given positions

func (SliceByte) DropEvery

func (s SliceByte) DropEvery(nth int, from int) ([]byte, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceByte) DropWhile

func (s SliceByte) DropWhile(f func(el byte) bool) []byte

DropWhile drops elements from arr while f returns true

func (SliceByte) Each

func (s SliceByte) Each(f func(el byte))

Each calls f for every element from arr

func (SliceByte) EndsWith

func (s SliceByte) EndsWith(suffix []byte) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceByte) Equal

func (s SliceByte) Equal(other []byte) bool

Equal returns true if slices are equal

func (SliceByte) Filter

func (s SliceByte) Filter(f func(el byte) bool) []byte

Filter returns slice of T for which F returned true

func (SliceByte) Find

func (s SliceByte) Find(f func(el byte) bool) (byte, error)

Find returns the first element for which f returns true

func (SliceByte) FindIndex

func (s SliceByte) FindIndex(f func(el byte) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceByte) GroupByBool

func (s SliceByte) GroupByBool(f func(el byte) bool) map[bool][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByByte

func (s SliceByte) GroupByByte(f func(el byte) byte) map[byte][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByError

func (s SliceByte) GroupByError(f func(el byte) error) map[error][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByFloat32

func (s SliceByte) GroupByFloat32(f func(el byte) float32) map[float32][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByFloat64

func (s SliceByte) GroupByFloat64(f func(el byte) float64) map[float64][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByInt

func (s SliceByte) GroupByInt(f func(el byte) int) map[int][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByInt16

func (s SliceByte) GroupByInt16(f func(el byte) int16) map[int16][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByInt32

func (s SliceByte) GroupByInt32(f func(el byte) int32) map[int32][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByInt64

func (s SliceByte) GroupByInt64(f func(el byte) int64) map[int64][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByInt8

func (s SliceByte) GroupByInt8(f func(el byte) int8) map[int8][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByInterface

func (s SliceByte) GroupByInterface(f func(el byte) interface{}) map[interface{}][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByRune

func (s SliceByte) GroupByRune(f func(el byte) rune) map[rune][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByString

func (s SliceByte) GroupByString(f func(el byte) string) map[string][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByUint

func (s SliceByte) GroupByUint(f func(el byte) uint) map[uint][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByUint16

func (s SliceByte) GroupByUint16(f func(el byte) uint16) map[uint16][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByUint32

func (s SliceByte) GroupByUint32(f func(el byte) uint32) map[uint32][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByUint64

func (s SliceByte) GroupByUint64(f func(el byte) uint64) map[uint64][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) GroupByUint8

func (s SliceByte) GroupByUint8(f func(el byte) uint8) map[uint8][]byte

GroupBy groups element from array by value returned by f

func (SliceByte) InsertAt

func (s SliceByte) InsertAt(index int, element byte) ([]byte, error)

InsertAt returns the slice with element inserted at given index.

func (SliceByte) Intersperse

func (s SliceByte) Intersperse(el byte) []byte

Intersperse inserts el between each element of arr

func (SliceByte) Join

func (s SliceByte) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceByte) Last

func (s SliceByte) Last() (byte, error)

Last returns the last element from the slice

func (SliceByte) MapBool

func (s SliceByte) MapBool(f func(el byte) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapByte

func (s SliceByte) MapByte(f func(el byte) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapError

func (s SliceByte) MapError(f func(el byte) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapFloat32

func (s SliceByte) MapFloat32(f func(el byte) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapFloat64

func (s SliceByte) MapFloat64(f func(el byte) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapInt

func (s SliceByte) MapInt(f func(el byte) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapInt16

func (s SliceByte) MapInt16(f func(el byte) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapInt32

func (s SliceByte) MapInt32(f func(el byte) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapInt64

func (s SliceByte) MapInt64(f func(el byte) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapInt8

func (s SliceByte) MapInt8(f func(el byte) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapInterface

func (s SliceByte) MapInterface(f func(el byte) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapRune

func (s SliceByte) MapRune(f func(el byte) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapString

func (s SliceByte) MapString(f func(el byte) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapUint

func (s SliceByte) MapUint(f func(el byte) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapUint16

func (s SliceByte) MapUint16(f func(el byte) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapUint32

func (s SliceByte) MapUint32(f func(el byte) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapUint64

func (s SliceByte) MapUint64(f func(el byte) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) MapUint8

func (s SliceByte) MapUint8(f func(el byte) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceByte) Max

func (s SliceByte) Max() (byte, error)

Max returns the maximal element from arr

func (SliceByte) Min

func (s SliceByte) Min() (byte, error)

Min returns the minimal element from arr

func (SliceByte) Permutations

func (s SliceByte) Permutations(size int) chan []byte

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceByte) Product

func (s SliceByte) Product(repeat int) chan []byte

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceByte) ReduceBool

func (s SliceByte) ReduceBool(acc bool, f func(el byte, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceByte

func (s SliceByte) ReduceByte(acc byte, f func(el byte, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceError

func (s SliceByte) ReduceError(acc error, f func(el byte, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceFloat32

func (s SliceByte) ReduceFloat32(acc float32, f func(el byte, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceFloat64

func (s SliceByte) ReduceFloat64(acc float64, f func(el byte, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceInt

func (s SliceByte) ReduceInt(acc int, f func(el byte, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceInt16

func (s SliceByte) ReduceInt16(acc int16, f func(el byte, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceInt32

func (s SliceByte) ReduceInt32(acc int32, f func(el byte, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceInt64

func (s SliceByte) ReduceInt64(acc int64, f func(el byte, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceInt8

func (s SliceByte) ReduceInt8(acc int8, f func(el byte, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceInterface

func (s SliceByte) ReduceInterface(acc interface{}, f func(el byte, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceRune

func (s SliceByte) ReduceRune(acc rune, f func(el byte, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceString

func (s SliceByte) ReduceString(acc string, f func(el byte, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceUint

func (s SliceByte) ReduceUint(acc uint, f func(el byte, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceUint16

func (s SliceByte) ReduceUint16(acc uint16, f func(el byte, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceUint32

func (s SliceByte) ReduceUint32(acc uint32, f func(el byte, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceUint64

func (s SliceByte) ReduceUint64(acc uint64, f func(el byte, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceUint8

func (s SliceByte) ReduceUint8(acc uint8, f func(el byte, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceByte) ReduceWhileBool

func (s SliceByte) ReduceWhileBool(acc bool, f func(el byte, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileByte

func (s SliceByte) ReduceWhileByte(acc byte, f func(el byte, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileError

func (s SliceByte) ReduceWhileError(acc error, f func(el byte, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileFloat32

func (s SliceByte) ReduceWhileFloat32(acc float32, f func(el byte, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileFloat64

func (s SliceByte) ReduceWhileFloat64(acc float64, f func(el byte, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileInt

func (s SliceByte) ReduceWhileInt(acc int, f func(el byte, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileInt16

func (s SliceByte) ReduceWhileInt16(acc int16, f func(el byte, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileInt32

func (s SliceByte) ReduceWhileInt32(acc int32, f func(el byte, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileInt64

func (s SliceByte) ReduceWhileInt64(acc int64, f func(el byte, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileInt8

func (s SliceByte) ReduceWhileInt8(acc int8, f func(el byte, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileInterface

func (s SliceByte) ReduceWhileInterface(acc interface{}, f func(el byte, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileRune

func (s SliceByte) ReduceWhileRune(acc rune, f func(el byte, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileString

func (s SliceByte) ReduceWhileString(acc string, f func(el byte, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileUint

func (s SliceByte) ReduceWhileUint(acc uint, f func(el byte, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileUint16

func (s SliceByte) ReduceWhileUint16(acc uint16, f func(el byte, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileUint32

func (s SliceByte) ReduceWhileUint32(acc uint32, f func(el byte, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileUint64

func (s SliceByte) ReduceWhileUint64(acc uint64, f func(el byte, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) ReduceWhileUint8

func (s SliceByte) ReduceWhileUint8(acc uint8, f func(el byte, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceByte) Reverse

func (s SliceByte) Reverse() []byte

Reverse returns given arr in reversed order

func (SliceByte) Same

func (s SliceByte) Same() bool

Same returns true if all element in arr the same

func (SliceByte) ScanBool

func (s SliceByte) ScanBool(acc bool, f func(el byte, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanByte

func (s SliceByte) ScanByte(acc byte, f func(el byte, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanError

func (s SliceByte) ScanError(acc error, f func(el byte, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanFloat32

func (s SliceByte) ScanFloat32(acc float32, f func(el byte, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanFloat64

func (s SliceByte) ScanFloat64(acc float64, f func(el byte, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanInt

func (s SliceByte) ScanInt(acc int, f func(el byte, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanInt16

func (s SliceByte) ScanInt16(acc int16, f func(el byte, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanInt32

func (s SliceByte) ScanInt32(acc int32, f func(el byte, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanInt64

func (s SliceByte) ScanInt64(acc int64, f func(el byte, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanInt8

func (s SliceByte) ScanInt8(acc int8, f func(el byte, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanInterface

func (s SliceByte) ScanInterface(acc interface{}, f func(el byte, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanRune

func (s SliceByte) ScanRune(acc rune, f func(el byte, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanString

func (s SliceByte) ScanString(acc string, f func(el byte, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanUint

func (s SliceByte) ScanUint(acc uint, f func(el byte, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanUint16

func (s SliceByte) ScanUint16(acc uint16, f func(el byte, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanUint32

func (s SliceByte) ScanUint32(acc uint32, f func(el byte, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanUint64

func (s SliceByte) ScanUint64(acc uint64, f func(el byte, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceByte) ScanUint8

func (s SliceByte) ScanUint8(acc uint8, f func(el byte, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceByte) Shuffle

func (s SliceByte) Shuffle(seed int64) []byte

Shuffle in random order arr elements

func (SliceByte) Sort

func (s SliceByte) Sort() []byte

Sort returns sorted slice

func (SliceByte) Sorted

func (s SliceByte) Sorted() bool

Sorted returns true if slice is sorted

func (SliceByte) Split

func (s SliceByte) Split(sep byte) [][]byte

Split splits arr by sep

func (SliceByte) StartsWith

func (s SliceByte) StartsWith(prefix []byte) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceByte) Sum

func (s SliceByte) Sum() byte

Sum return sum of all elements from arr

func (SliceByte) TakeEvery

func (s SliceByte) TakeEvery(nth int, from int) ([]byte, error)

TakeEvery returns slice of every nth elements

func (SliceByte) TakeRandom

func (s SliceByte) TakeRandom(count int, seed int64) ([]byte, error)

TakeRandom returns slice of count random elements from the slice

func (SliceByte) TakeWhile

func (s SliceByte) TakeWhile(f func(el byte) bool) []byte

TakeWhile takes elements from arr while f returns true

func (SliceByte) ToChannel

func (s SliceByte) ToChannel() chan byte

ToChannel returns channel with elements from the slice

func (SliceByte) Uniq

func (s SliceByte) Uniq() []byte

Uniq returns arr with only first occurences of every element.

func (SliceByte) Window

func (s SliceByte) Window(size int) ([][]byte, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceByte) Without

func (s SliceByte) Without(elements ...byte) []byte

Without returns the slice with filtered out element

type SliceError

type SliceError struct {
	Data []error
}

Slice is a set of operations to work with slice

func (SliceError) All

func (s SliceError) All(f func(el error) bool) bool

All returns true if f returns true for all elements in arr

func (SliceError) Any

func (s SliceError) Any(f func(el error) bool) bool

Any returns true if f returns true for any element in arr

func (SliceError) Choice

func (s SliceError) Choice(seed int64) (error, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceError) ChunkByBool

func (s SliceError) ChunkByBool(f func(el error) bool) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByByte

func (s SliceError) ChunkByByte(f func(el error) byte) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByError

func (s SliceError) ChunkByError(f func(el error) error) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByFloat32

func (s SliceError) ChunkByFloat32(f func(el error) float32) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByFloat64

func (s SliceError) ChunkByFloat64(f func(el error) float64) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByInt

func (s SliceError) ChunkByInt(f func(el error) int) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByInt16

func (s SliceError) ChunkByInt16(f func(el error) int16) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByInt32

func (s SliceError) ChunkByInt32(f func(el error) int32) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByInt64

func (s SliceError) ChunkByInt64(f func(el error) int64) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByInt8

func (s SliceError) ChunkByInt8(f func(el error) int8) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByInterface

func (s SliceError) ChunkByInterface(f func(el error) interface{}) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByRune

func (s SliceError) ChunkByRune(f func(el error) rune) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByString

func (s SliceError) ChunkByString(f func(el error) string) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByUint

func (s SliceError) ChunkByUint(f func(el error) uint) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByUint16

func (s SliceError) ChunkByUint16(f func(el error) uint16) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByUint32

func (s SliceError) ChunkByUint32(f func(el error) uint32) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByUint64

func (s SliceError) ChunkByUint64(f func(el error) uint64) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkByUint8

func (s SliceError) ChunkByUint8(f func(el error) uint8) [][]error

ChunkBy splits arr on every element for which f returns a new value.

func (SliceError) ChunkEvery

func (s SliceError) ChunkEvery(count int) ([][]error, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceError) Contains

func (s SliceError) Contains(el error) bool

Contains returns true if el in arr.

func (SliceError) Count

func (s SliceError) Count(el error) int

Count return count of el occurences in arr.

func (SliceError) CountBy

func (s SliceError) CountBy(f func(el error) bool) int

CountBy returns how many times f returns true.

func (SliceError) Cycle

func (s SliceError) Cycle() chan error

Cycle is an infinite loop over slice

func (SliceError) Dedup

func (s SliceError) Dedup() []error

Dedup returns a given slice without consecutive duplicated elements

func (SliceError) DedupByBool

func (s SliceError) DedupByBool(f func(el error) bool) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByByte

func (s SliceError) DedupByByte(f func(el error) byte) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByError

func (s SliceError) DedupByError(f func(el error) error) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByFloat32

func (s SliceError) DedupByFloat32(f func(el error) float32) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByFloat64

func (s SliceError) DedupByFloat64(f func(el error) float64) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByInt

func (s SliceError) DedupByInt(f func(el error) int) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByInt16

func (s SliceError) DedupByInt16(f func(el error) int16) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByInt32

func (s SliceError) DedupByInt32(f func(el error) int32) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByInt64

func (s SliceError) DedupByInt64(f func(el error) int64) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByInt8

func (s SliceError) DedupByInt8(f func(el error) int8) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByInterface

func (s SliceError) DedupByInterface(f func(el error) interface{}) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByRune

func (s SliceError) DedupByRune(f func(el error) rune) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByString

func (s SliceError) DedupByString(f func(el error) string) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByUint

func (s SliceError) DedupByUint(f func(el error) uint) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByUint16

func (s SliceError) DedupByUint16(f func(el error) uint16) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByUint32

func (s SliceError) DedupByUint32(f func(el error) uint32) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByUint64

func (s SliceError) DedupByUint64(f func(el error) uint64) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) DedupByUint8

func (s SliceError) DedupByUint8(f func(el error) uint8) []error

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceError) Delete

func (s SliceError) Delete(element error) []error

Delete deletes the first occurence of the element from the slice

func (SliceError) DeleteAll

func (s SliceError) DeleteAll(element error) []error

DeleteAll deletes all occurences of the element from the slice

func (SliceError) DeleteAt

func (s SliceError) DeleteAt(indices ...int) ([]error, error)

DeleteAt returns the slice without elements on given positions

func (SliceError) DropEvery

func (s SliceError) DropEvery(nth int, from int) ([]error, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceError) DropWhile

func (s SliceError) DropWhile(f func(el error) bool) []error

DropWhile drops elements from arr while f returns true

func (SliceError) Each

func (s SliceError) Each(f func(el error))

Each calls f for every element from arr

func (SliceError) EndsWith

func (s SliceError) EndsWith(suffix []error) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceError) Equal

func (s SliceError) Equal(other []error) bool

Equal returns true if slices are equal

func (SliceError) Filter

func (s SliceError) Filter(f func(el error) bool) []error

Filter returns slice of T for which F returned true

func (SliceError) Find

func (s SliceError) Find(f func(el error) bool) (error, error)

Find returns the first element for which f returns true

func (SliceError) FindIndex

func (s SliceError) FindIndex(f func(el error) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceError) GroupByBool

func (s SliceError) GroupByBool(f func(el error) bool) map[bool][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByByte

func (s SliceError) GroupByByte(f func(el error) byte) map[byte][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByError

func (s SliceError) GroupByError(f func(el error) error) map[error][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByFloat32

func (s SliceError) GroupByFloat32(f func(el error) float32) map[float32][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByFloat64

func (s SliceError) GroupByFloat64(f func(el error) float64) map[float64][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByInt

func (s SliceError) GroupByInt(f func(el error) int) map[int][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByInt16

func (s SliceError) GroupByInt16(f func(el error) int16) map[int16][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByInt32

func (s SliceError) GroupByInt32(f func(el error) int32) map[int32][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByInt64

func (s SliceError) GroupByInt64(f func(el error) int64) map[int64][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByInt8

func (s SliceError) GroupByInt8(f func(el error) int8) map[int8][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByInterface

func (s SliceError) GroupByInterface(f func(el error) interface{}) map[interface{}][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByRune

func (s SliceError) GroupByRune(f func(el error) rune) map[rune][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByString

func (s SliceError) GroupByString(f func(el error) string) map[string][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByUint

func (s SliceError) GroupByUint(f func(el error) uint) map[uint][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByUint16

func (s SliceError) GroupByUint16(f func(el error) uint16) map[uint16][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByUint32

func (s SliceError) GroupByUint32(f func(el error) uint32) map[uint32][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByUint64

func (s SliceError) GroupByUint64(f func(el error) uint64) map[uint64][]error

GroupBy groups element from array by value returned by f

func (SliceError) GroupByUint8

func (s SliceError) GroupByUint8(f func(el error) uint8) map[uint8][]error

GroupBy groups element from array by value returned by f

func (SliceError) InsertAt

func (s SliceError) InsertAt(index int, element error) ([]error, error)

InsertAt returns the slice with element inserted at given index.

func (SliceError) Intersperse

func (s SliceError) Intersperse(el error) []error

Intersperse inserts el between each element of arr

func (SliceError) Join

func (s SliceError) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceError) Last

func (s SliceError) Last() (error, error)

Last returns the last element from the slice

func (SliceError) MapBool

func (s SliceError) MapBool(f func(el error) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapByte

func (s SliceError) MapByte(f func(el error) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapError

func (s SliceError) MapError(f func(el error) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapFloat32

func (s SliceError) MapFloat32(f func(el error) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapFloat64

func (s SliceError) MapFloat64(f func(el error) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapInt

func (s SliceError) MapInt(f func(el error) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapInt16

func (s SliceError) MapInt16(f func(el error) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapInt32

func (s SliceError) MapInt32(f func(el error) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapInt64

func (s SliceError) MapInt64(f func(el error) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapInt8

func (s SliceError) MapInt8(f func(el error) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapInterface

func (s SliceError) MapInterface(f func(el error) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapRune

func (s SliceError) MapRune(f func(el error) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapString

func (s SliceError) MapString(f func(el error) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapUint

func (s SliceError) MapUint(f func(el error) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapUint16

func (s SliceError) MapUint16(f func(el error) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapUint32

func (s SliceError) MapUint32(f func(el error) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapUint64

func (s SliceError) MapUint64(f func(el error) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) MapUint8

func (s SliceError) MapUint8(f func(el error) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceError) Permutations

func (s SliceError) Permutations(size int) chan []error

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceError) Product

func (s SliceError) Product(repeat int) chan []error

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceError) ReduceBool

func (s SliceError) ReduceBool(acc bool, f func(el error, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceByte

func (s SliceError) ReduceByte(acc byte, f func(el error, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceError

func (s SliceError) ReduceError(acc error, f func(el error, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceFloat32

func (s SliceError) ReduceFloat32(acc float32, f func(el error, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceFloat64

func (s SliceError) ReduceFloat64(acc float64, f func(el error, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceInt

func (s SliceError) ReduceInt(acc int, f func(el error, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceInt16

func (s SliceError) ReduceInt16(acc int16, f func(el error, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceInt32

func (s SliceError) ReduceInt32(acc int32, f func(el error, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceInt64

func (s SliceError) ReduceInt64(acc int64, f func(el error, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceInt8

func (s SliceError) ReduceInt8(acc int8, f func(el error, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceInterface

func (s SliceError) ReduceInterface(acc interface{}, f func(el error, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceRune

func (s SliceError) ReduceRune(acc rune, f func(el error, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceString

func (s SliceError) ReduceString(acc string, f func(el error, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceUint

func (s SliceError) ReduceUint(acc uint, f func(el error, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceUint16

func (s SliceError) ReduceUint16(acc uint16, f func(el error, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceUint32

func (s SliceError) ReduceUint32(acc uint32, f func(el error, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceUint64

func (s SliceError) ReduceUint64(acc uint64, f func(el error, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceUint8

func (s SliceError) ReduceUint8(acc uint8, f func(el error, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceError) ReduceWhileBool

func (s SliceError) ReduceWhileBool(acc bool, f func(el error, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileByte

func (s SliceError) ReduceWhileByte(acc byte, f func(el error, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileError

func (s SliceError) ReduceWhileError(acc error, f func(el error, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileFloat32

func (s SliceError) ReduceWhileFloat32(acc float32, f func(el error, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileFloat64

func (s SliceError) ReduceWhileFloat64(acc float64, f func(el error, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileInt

func (s SliceError) ReduceWhileInt(acc int, f func(el error, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileInt16

func (s SliceError) ReduceWhileInt16(acc int16, f func(el error, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileInt32

func (s SliceError) ReduceWhileInt32(acc int32, f func(el error, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileInt64

func (s SliceError) ReduceWhileInt64(acc int64, f func(el error, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileInt8

func (s SliceError) ReduceWhileInt8(acc int8, f func(el error, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileInterface

func (s SliceError) ReduceWhileInterface(acc interface{}, f func(el error, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileRune

func (s SliceError) ReduceWhileRune(acc rune, f func(el error, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileString

func (s SliceError) ReduceWhileString(acc string, f func(el error, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileUint

func (s SliceError) ReduceWhileUint(acc uint, f func(el error, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileUint16

func (s SliceError) ReduceWhileUint16(acc uint16, f func(el error, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileUint32

func (s SliceError) ReduceWhileUint32(acc uint32, f func(el error, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileUint64

func (s SliceError) ReduceWhileUint64(acc uint64, f func(el error, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) ReduceWhileUint8

func (s SliceError) ReduceWhileUint8(acc uint8, f func(el error, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceError) Reverse

func (s SliceError) Reverse() []error

Reverse returns given arr in reversed order

func (SliceError) Same

func (s SliceError) Same() bool

Same returns true if all element in arr the same

func (SliceError) ScanBool

func (s SliceError) ScanBool(acc bool, f func(el error, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanByte

func (s SliceError) ScanByte(acc byte, f func(el error, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanError

func (s SliceError) ScanError(acc error, f func(el error, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanFloat32

func (s SliceError) ScanFloat32(acc float32, f func(el error, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanFloat64

func (s SliceError) ScanFloat64(acc float64, f func(el error, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanInt

func (s SliceError) ScanInt(acc int, f func(el error, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanInt16

func (s SliceError) ScanInt16(acc int16, f func(el error, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanInt32

func (s SliceError) ScanInt32(acc int32, f func(el error, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanInt64

func (s SliceError) ScanInt64(acc int64, f func(el error, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanInt8

func (s SliceError) ScanInt8(acc int8, f func(el error, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanInterface

func (s SliceError) ScanInterface(acc interface{}, f func(el error, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanRune

func (s SliceError) ScanRune(acc rune, f func(el error, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanString

func (s SliceError) ScanString(acc string, f func(el error, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanUint

func (s SliceError) ScanUint(acc uint, f func(el error, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanUint16

func (s SliceError) ScanUint16(acc uint16, f func(el error, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanUint32

func (s SliceError) ScanUint32(acc uint32, f func(el error, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanUint64

func (s SliceError) ScanUint64(acc uint64, f func(el error, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceError) ScanUint8

func (s SliceError) ScanUint8(acc uint8, f func(el error, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceError) Shuffle

func (s SliceError) Shuffle(seed int64) []error

Shuffle in random order arr elements

func (SliceError) Split

func (s SliceError) Split(sep error) [][]error

Split splits arr by sep

func (SliceError) StartsWith

func (s SliceError) StartsWith(prefix []error) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceError) TakeEvery

func (s SliceError) TakeEvery(nth int, from int) ([]error, error)

TakeEvery returns slice of every nth elements

func (SliceError) TakeRandom

func (s SliceError) TakeRandom(count int, seed int64) ([]error, error)

TakeRandom returns slice of count random elements from the slice

func (SliceError) TakeWhile

func (s SliceError) TakeWhile(f func(el error) bool) []error

TakeWhile takes elements from arr while f returns true

func (SliceError) ToChannel

func (s SliceError) ToChannel() chan error

ToChannel returns channel with elements from the slice

func (SliceError) Uniq

func (s SliceError) Uniq() []error

Uniq returns arr with only first occurences of every element.

func (SliceError) Window

func (s SliceError) Window(size int) ([][]error, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceError) Without

func (s SliceError) Without(elements ...error) []error

Without returns the slice with filtered out element

type SliceFloat32

type SliceFloat32 struct {
	Data []float32
}

Slice is a set of operations to work with slice

func (SliceFloat32) All

func (s SliceFloat32) All(f func(el float32) bool) bool

All returns true if f returns true for all elements in arr

func (SliceFloat32) Any

func (s SliceFloat32) Any(f func(el float32) bool) bool

Any returns true if f returns true for any element in arr

func (SliceFloat32) Choice

func (s SliceFloat32) Choice(seed int64) (float32, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceFloat32) ChunkByBool

func (s SliceFloat32) ChunkByBool(f func(el float32) bool) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByByte

func (s SliceFloat32) ChunkByByte(f func(el float32) byte) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByError

func (s SliceFloat32) ChunkByError(f func(el float32) error) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByFloat32

func (s SliceFloat32) ChunkByFloat32(f func(el float32) float32) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByFloat64

func (s SliceFloat32) ChunkByFloat64(f func(el float32) float64) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByInt

func (s SliceFloat32) ChunkByInt(f func(el float32) int) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByInt16

func (s SliceFloat32) ChunkByInt16(f func(el float32) int16) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByInt32

func (s SliceFloat32) ChunkByInt32(f func(el float32) int32) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByInt64

func (s SliceFloat32) ChunkByInt64(f func(el float32) int64) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByInt8

func (s SliceFloat32) ChunkByInt8(f func(el float32) int8) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByInterface

func (s SliceFloat32) ChunkByInterface(f func(el float32) interface{}) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByRune

func (s SliceFloat32) ChunkByRune(f func(el float32) rune) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByString

func (s SliceFloat32) ChunkByString(f func(el float32) string) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByUint

func (s SliceFloat32) ChunkByUint(f func(el float32) uint) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByUint16

func (s SliceFloat32) ChunkByUint16(f func(el float32) uint16) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByUint32

func (s SliceFloat32) ChunkByUint32(f func(el float32) uint32) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByUint64

func (s SliceFloat32) ChunkByUint64(f func(el float32) uint64) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkByUint8

func (s SliceFloat32) ChunkByUint8(f func(el float32) uint8) [][]float32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat32) ChunkEvery

func (s SliceFloat32) ChunkEvery(count int) ([][]float32, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceFloat32) Contains

func (s SliceFloat32) Contains(el float32) bool

Contains returns true if el in arr.

func (SliceFloat32) Count

func (s SliceFloat32) Count(el float32) int

Count return count of el occurences in arr.

func (SliceFloat32) CountBy

func (s SliceFloat32) CountBy(f func(el float32) bool) int

CountBy returns how many times f returns true.

func (SliceFloat32) Cycle

func (s SliceFloat32) Cycle() chan float32

Cycle is an infinite loop over slice

func (SliceFloat32) Dedup

func (s SliceFloat32) Dedup() []float32

Dedup returns a given slice without consecutive duplicated elements

func (SliceFloat32) DedupByBool

func (s SliceFloat32) DedupByBool(f func(el float32) bool) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByByte

func (s SliceFloat32) DedupByByte(f func(el float32) byte) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByError

func (s SliceFloat32) DedupByError(f func(el float32) error) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByFloat32

func (s SliceFloat32) DedupByFloat32(f func(el float32) float32) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByFloat64

func (s SliceFloat32) DedupByFloat64(f func(el float32) float64) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByInt

func (s SliceFloat32) DedupByInt(f func(el float32) int) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByInt16

func (s SliceFloat32) DedupByInt16(f func(el float32) int16) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByInt32

func (s SliceFloat32) DedupByInt32(f func(el float32) int32) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByInt64

func (s SliceFloat32) DedupByInt64(f func(el float32) int64) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByInt8

func (s SliceFloat32) DedupByInt8(f func(el float32) int8) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByInterface

func (s SliceFloat32) DedupByInterface(f func(el float32) interface{}) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByRune

func (s SliceFloat32) DedupByRune(f func(el float32) rune) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByString

func (s SliceFloat32) DedupByString(f func(el float32) string) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByUint

func (s SliceFloat32) DedupByUint(f func(el float32) uint) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByUint16

func (s SliceFloat32) DedupByUint16(f func(el float32) uint16) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByUint32

func (s SliceFloat32) DedupByUint32(f func(el float32) uint32) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByUint64

func (s SliceFloat32) DedupByUint64(f func(el float32) uint64) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) DedupByUint8

func (s SliceFloat32) DedupByUint8(f func(el float32) uint8) []float32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat32) Delete

func (s SliceFloat32) Delete(element float32) []float32

Delete deletes the first occurence of the element from the slice

func (SliceFloat32) DeleteAll

func (s SliceFloat32) DeleteAll(element float32) []float32

DeleteAll deletes all occurences of the element from the slice

func (SliceFloat32) DeleteAt

func (s SliceFloat32) DeleteAt(indices ...int) ([]float32, error)

DeleteAt returns the slice without elements on given positions

func (SliceFloat32) DropEvery

func (s SliceFloat32) DropEvery(nth int, from int) ([]float32, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceFloat32) DropWhile

func (s SliceFloat32) DropWhile(f func(el float32) bool) []float32

DropWhile drops elements from arr while f returns true

func (SliceFloat32) Each

func (s SliceFloat32) Each(f func(el float32))

Each calls f for every element from arr

func (SliceFloat32) EndsWith

func (s SliceFloat32) EndsWith(suffix []float32) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceFloat32) Equal

func (s SliceFloat32) Equal(other []float32) bool

Equal returns true if slices are equal

func (SliceFloat32) Filter

func (s SliceFloat32) Filter(f func(el float32) bool) []float32

Filter returns slice of T for which F returned true

func (SliceFloat32) Find

func (s SliceFloat32) Find(f func(el float32) bool) (float32, error)

Find returns the first element for which f returns true

func (SliceFloat32) FindIndex

func (s SliceFloat32) FindIndex(f func(el float32) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceFloat32) GroupByBool

func (s SliceFloat32) GroupByBool(f func(el float32) bool) map[bool][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByByte

func (s SliceFloat32) GroupByByte(f func(el float32) byte) map[byte][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByError

func (s SliceFloat32) GroupByError(f func(el float32) error) map[error][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByFloat32

func (s SliceFloat32) GroupByFloat32(f func(el float32) float32) map[float32][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByFloat64

func (s SliceFloat32) GroupByFloat64(f func(el float32) float64) map[float64][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByInt

func (s SliceFloat32) GroupByInt(f func(el float32) int) map[int][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByInt16

func (s SliceFloat32) GroupByInt16(f func(el float32) int16) map[int16][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByInt32

func (s SliceFloat32) GroupByInt32(f func(el float32) int32) map[int32][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByInt64

func (s SliceFloat32) GroupByInt64(f func(el float32) int64) map[int64][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByInt8

func (s SliceFloat32) GroupByInt8(f func(el float32) int8) map[int8][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByInterface

func (s SliceFloat32) GroupByInterface(f func(el float32) interface{}) map[interface{}][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByRune

func (s SliceFloat32) GroupByRune(f func(el float32) rune) map[rune][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByString

func (s SliceFloat32) GroupByString(f func(el float32) string) map[string][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByUint

func (s SliceFloat32) GroupByUint(f func(el float32) uint) map[uint][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByUint16

func (s SliceFloat32) GroupByUint16(f func(el float32) uint16) map[uint16][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByUint32

func (s SliceFloat32) GroupByUint32(f func(el float32) uint32) map[uint32][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByUint64

func (s SliceFloat32) GroupByUint64(f func(el float32) uint64) map[uint64][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) GroupByUint8

func (s SliceFloat32) GroupByUint8(f func(el float32) uint8) map[uint8][]float32

GroupBy groups element from array by value returned by f

func (SliceFloat32) InsertAt

func (s SliceFloat32) InsertAt(index int, element float32) ([]float32, error)

InsertAt returns the slice with element inserted at given index.

func (SliceFloat32) Intersperse

func (s SliceFloat32) Intersperse(el float32) []float32

Intersperse inserts el between each element of arr

func (SliceFloat32) Last

func (s SliceFloat32) Last() (float32, error)

Last returns the last element from the slice

func (SliceFloat32) MapBool

func (s SliceFloat32) MapBool(f func(el float32) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapByte

func (s SliceFloat32) MapByte(f func(el float32) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapError

func (s SliceFloat32) MapError(f func(el float32) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapFloat32

func (s SliceFloat32) MapFloat32(f func(el float32) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapFloat64

func (s SliceFloat32) MapFloat64(f func(el float32) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapInt

func (s SliceFloat32) MapInt(f func(el float32) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapInt16

func (s SliceFloat32) MapInt16(f func(el float32) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapInt32

func (s SliceFloat32) MapInt32(f func(el float32) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapInt64

func (s SliceFloat32) MapInt64(f func(el float32) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapInt8

func (s SliceFloat32) MapInt8(f func(el float32) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapInterface

func (s SliceFloat32) MapInterface(f func(el float32) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapRune

func (s SliceFloat32) MapRune(f func(el float32) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapString

func (s SliceFloat32) MapString(f func(el float32) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapUint

func (s SliceFloat32) MapUint(f func(el float32) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapUint16

func (s SliceFloat32) MapUint16(f func(el float32) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapUint32

func (s SliceFloat32) MapUint32(f func(el float32) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapUint64

func (s SliceFloat32) MapUint64(f func(el float32) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) MapUint8

func (s SliceFloat32) MapUint8(f func(el float32) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat32) Max

func (s SliceFloat32) Max() (float32, error)

Max returns the maximal element from arr

func (SliceFloat32) Min

func (s SliceFloat32) Min() (float32, error)

Min returns the minimal element from arr

func (SliceFloat32) Permutations

func (s SliceFloat32) Permutations(size int) chan []float32

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceFloat32) Product

func (s SliceFloat32) Product(repeat int) chan []float32

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceFloat32) ReduceBool

func (s SliceFloat32) ReduceBool(acc bool, f func(el float32, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceByte

func (s SliceFloat32) ReduceByte(acc byte, f func(el float32, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceError

func (s SliceFloat32) ReduceError(acc error, f func(el float32, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceFloat32

func (s SliceFloat32) ReduceFloat32(acc float32, f func(el float32, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceFloat64

func (s SliceFloat32) ReduceFloat64(acc float64, f func(el float32, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceInt

func (s SliceFloat32) ReduceInt(acc int, f func(el float32, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceInt16

func (s SliceFloat32) ReduceInt16(acc int16, f func(el float32, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceInt32

func (s SliceFloat32) ReduceInt32(acc int32, f func(el float32, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceInt64

func (s SliceFloat32) ReduceInt64(acc int64, f func(el float32, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceInt8

func (s SliceFloat32) ReduceInt8(acc int8, f func(el float32, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceInterface

func (s SliceFloat32) ReduceInterface(acc interface{}, f func(el float32, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceRune

func (s SliceFloat32) ReduceRune(acc rune, f func(el float32, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceString

func (s SliceFloat32) ReduceString(acc string, f func(el float32, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceUint

func (s SliceFloat32) ReduceUint(acc uint, f func(el float32, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceUint16

func (s SliceFloat32) ReduceUint16(acc uint16, f func(el float32, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceUint32

func (s SliceFloat32) ReduceUint32(acc uint32, f func(el float32, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceUint64

func (s SliceFloat32) ReduceUint64(acc uint64, f func(el float32, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceUint8

func (s SliceFloat32) ReduceUint8(acc uint8, f func(el float32, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat32) ReduceWhileBool

func (s SliceFloat32) ReduceWhileBool(acc bool, f func(el float32, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileByte

func (s SliceFloat32) ReduceWhileByte(acc byte, f func(el float32, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileError

func (s SliceFloat32) ReduceWhileError(acc error, f func(el float32, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileFloat32

func (s SliceFloat32) ReduceWhileFloat32(acc float32, f func(el float32, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileFloat64

func (s SliceFloat32) ReduceWhileFloat64(acc float64, f func(el float32, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileInt

func (s SliceFloat32) ReduceWhileInt(acc int, f func(el float32, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileInt16

func (s SliceFloat32) ReduceWhileInt16(acc int16, f func(el float32, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileInt32

func (s SliceFloat32) ReduceWhileInt32(acc int32, f func(el float32, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileInt64

func (s SliceFloat32) ReduceWhileInt64(acc int64, f func(el float32, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileInt8

func (s SliceFloat32) ReduceWhileInt8(acc int8, f func(el float32, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileInterface

func (s SliceFloat32) ReduceWhileInterface(acc interface{}, f func(el float32, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileRune

func (s SliceFloat32) ReduceWhileRune(acc rune, f func(el float32, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileString

func (s SliceFloat32) ReduceWhileString(acc string, f func(el float32, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileUint

func (s SliceFloat32) ReduceWhileUint(acc uint, f func(el float32, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileUint16

func (s SliceFloat32) ReduceWhileUint16(acc uint16, f func(el float32, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileUint32

func (s SliceFloat32) ReduceWhileUint32(acc uint32, f func(el float32, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileUint64

func (s SliceFloat32) ReduceWhileUint64(acc uint64, f func(el float32, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) ReduceWhileUint8

func (s SliceFloat32) ReduceWhileUint8(acc uint8, f func(el float32, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat32) Reverse

func (s SliceFloat32) Reverse() []float32

Reverse returns given arr in reversed order

func (SliceFloat32) Same

func (s SliceFloat32) Same() bool

Same returns true if all element in arr the same

func (SliceFloat32) ScanBool

func (s SliceFloat32) ScanBool(acc bool, f func(el float32, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanByte

func (s SliceFloat32) ScanByte(acc byte, f func(el float32, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanError

func (s SliceFloat32) ScanError(acc error, f func(el float32, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanFloat32

func (s SliceFloat32) ScanFloat32(acc float32, f func(el float32, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanFloat64

func (s SliceFloat32) ScanFloat64(acc float64, f func(el float32, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanInt

func (s SliceFloat32) ScanInt(acc int, f func(el float32, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanInt16

func (s SliceFloat32) ScanInt16(acc int16, f func(el float32, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanInt32

func (s SliceFloat32) ScanInt32(acc int32, f func(el float32, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanInt64

func (s SliceFloat32) ScanInt64(acc int64, f func(el float32, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanInt8

func (s SliceFloat32) ScanInt8(acc int8, f func(el float32, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanInterface

func (s SliceFloat32) ScanInterface(acc interface{}, f func(el float32, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanRune

func (s SliceFloat32) ScanRune(acc rune, f func(el float32, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanString

func (s SliceFloat32) ScanString(acc string, f func(el float32, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanUint

func (s SliceFloat32) ScanUint(acc uint, f func(el float32, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanUint16

func (s SliceFloat32) ScanUint16(acc uint16, f func(el float32, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanUint32

func (s SliceFloat32) ScanUint32(acc uint32, f func(el float32, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanUint64

func (s SliceFloat32) ScanUint64(acc uint64, f func(el float32, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) ScanUint8

func (s SliceFloat32) ScanUint8(acc uint8, f func(el float32, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceFloat32) Shuffle

func (s SliceFloat32) Shuffle(seed int64) []float32

Shuffle in random order arr elements

func (SliceFloat32) Sort

func (s SliceFloat32) Sort() []float32

Sort returns sorted slice

func (SliceFloat32) Sorted

func (s SliceFloat32) Sorted() bool

Sorted returns true if slice is sorted

func (SliceFloat32) Split

func (s SliceFloat32) Split(sep float32) [][]float32

Split splits arr by sep

func (SliceFloat32) StartsWith

func (s SliceFloat32) StartsWith(prefix []float32) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceFloat32) Sum

func (s SliceFloat32) Sum() float32

Sum return sum of all elements from arr

func (SliceFloat32) TakeEvery

func (s SliceFloat32) TakeEvery(nth int, from int) ([]float32, error)

TakeEvery returns slice of every nth elements

func (SliceFloat32) TakeRandom

func (s SliceFloat32) TakeRandom(count int, seed int64) ([]float32, error)

TakeRandom returns slice of count random elements from the slice

func (SliceFloat32) TakeWhile

func (s SliceFloat32) TakeWhile(f func(el float32) bool) []float32

TakeWhile takes elements from arr while f returns true

func (SliceFloat32) ToChannel

func (s SliceFloat32) ToChannel() chan float32

ToChannel returns channel with elements from the slice

func (SliceFloat32) Uniq

func (s SliceFloat32) Uniq() []float32

Uniq returns arr with only first occurences of every element.

func (SliceFloat32) Window

func (s SliceFloat32) Window(size int) ([][]float32, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceFloat32) Without

func (s SliceFloat32) Without(elements ...float32) []float32

Without returns the slice with filtered out element

type SliceFloat64

type SliceFloat64 struct {
	Data []float64
}

Slice is a set of operations to work with slice

func (SliceFloat64) All

func (s SliceFloat64) All(f func(el float64) bool) bool

All returns true if f returns true for all elements in arr

func (SliceFloat64) Any

func (s SliceFloat64) Any(f func(el float64) bool) bool

Any returns true if f returns true for any element in arr

func (SliceFloat64) Choice

func (s SliceFloat64) Choice(seed int64) (float64, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceFloat64) ChunkByBool

func (s SliceFloat64) ChunkByBool(f func(el float64) bool) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByByte

func (s SliceFloat64) ChunkByByte(f func(el float64) byte) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByError

func (s SliceFloat64) ChunkByError(f func(el float64) error) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByFloat32

func (s SliceFloat64) ChunkByFloat32(f func(el float64) float32) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByFloat64

func (s SliceFloat64) ChunkByFloat64(f func(el float64) float64) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByInt

func (s SliceFloat64) ChunkByInt(f func(el float64) int) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByInt16

func (s SliceFloat64) ChunkByInt16(f func(el float64) int16) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByInt32

func (s SliceFloat64) ChunkByInt32(f func(el float64) int32) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByInt64

func (s SliceFloat64) ChunkByInt64(f func(el float64) int64) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByInt8

func (s SliceFloat64) ChunkByInt8(f func(el float64) int8) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByInterface

func (s SliceFloat64) ChunkByInterface(f func(el float64) interface{}) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByRune

func (s SliceFloat64) ChunkByRune(f func(el float64) rune) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByString

func (s SliceFloat64) ChunkByString(f func(el float64) string) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByUint

func (s SliceFloat64) ChunkByUint(f func(el float64) uint) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByUint16

func (s SliceFloat64) ChunkByUint16(f func(el float64) uint16) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByUint32

func (s SliceFloat64) ChunkByUint32(f func(el float64) uint32) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByUint64

func (s SliceFloat64) ChunkByUint64(f func(el float64) uint64) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkByUint8

func (s SliceFloat64) ChunkByUint8(f func(el float64) uint8) [][]float64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceFloat64) ChunkEvery

func (s SliceFloat64) ChunkEvery(count int) ([][]float64, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceFloat64) Contains

func (s SliceFloat64) Contains(el float64) bool

Contains returns true if el in arr.

func (SliceFloat64) Count

func (s SliceFloat64) Count(el float64) int

Count return count of el occurences in arr.

func (SliceFloat64) CountBy

func (s SliceFloat64) CountBy(f func(el float64) bool) int

CountBy returns how many times f returns true.

func (SliceFloat64) Cycle

func (s SliceFloat64) Cycle() chan float64

Cycle is an infinite loop over slice

func (SliceFloat64) Dedup

func (s SliceFloat64) Dedup() []float64

Dedup returns a given slice without consecutive duplicated elements

func (SliceFloat64) DedupByBool

func (s SliceFloat64) DedupByBool(f func(el float64) bool) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByByte

func (s SliceFloat64) DedupByByte(f func(el float64) byte) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByError

func (s SliceFloat64) DedupByError(f func(el float64) error) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByFloat32

func (s SliceFloat64) DedupByFloat32(f func(el float64) float32) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByFloat64

func (s SliceFloat64) DedupByFloat64(f func(el float64) float64) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByInt

func (s SliceFloat64) DedupByInt(f func(el float64) int) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByInt16

func (s SliceFloat64) DedupByInt16(f func(el float64) int16) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByInt32

func (s SliceFloat64) DedupByInt32(f func(el float64) int32) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByInt64

func (s SliceFloat64) DedupByInt64(f func(el float64) int64) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByInt8

func (s SliceFloat64) DedupByInt8(f func(el float64) int8) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByInterface

func (s SliceFloat64) DedupByInterface(f func(el float64) interface{}) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByRune

func (s SliceFloat64) DedupByRune(f func(el float64) rune) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByString

func (s SliceFloat64) DedupByString(f func(el float64) string) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByUint

func (s SliceFloat64) DedupByUint(f func(el float64) uint) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByUint16

func (s SliceFloat64) DedupByUint16(f func(el float64) uint16) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByUint32

func (s SliceFloat64) DedupByUint32(f func(el float64) uint32) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByUint64

func (s SliceFloat64) DedupByUint64(f func(el float64) uint64) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) DedupByUint8

func (s SliceFloat64) DedupByUint8(f func(el float64) uint8) []float64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceFloat64) Delete

func (s SliceFloat64) Delete(element float64) []float64

Delete deletes the first occurence of the element from the slice

func (SliceFloat64) DeleteAll

func (s SliceFloat64) DeleteAll(element float64) []float64

DeleteAll deletes all occurences of the element from the slice

func (SliceFloat64) DeleteAt

func (s SliceFloat64) DeleteAt(indices ...int) ([]float64, error)

DeleteAt returns the slice without elements on given positions

func (SliceFloat64) DropEvery

func (s SliceFloat64) DropEvery(nth int, from int) ([]float64, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceFloat64) DropWhile

func (s SliceFloat64) DropWhile(f func(el float64) bool) []float64

DropWhile drops elements from arr while f returns true

func (SliceFloat64) Each

func (s SliceFloat64) Each(f func(el float64))

Each calls f for every element from arr

func (SliceFloat64) EndsWith

func (s SliceFloat64) EndsWith(suffix []float64) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceFloat64) Equal

func (s SliceFloat64) Equal(other []float64) bool

Equal returns true if slices are equal

func (SliceFloat64) Filter

func (s SliceFloat64) Filter(f func(el float64) bool) []float64

Filter returns slice of T for which F returned true

func (SliceFloat64) Find

func (s SliceFloat64) Find(f func(el float64) bool) (float64, error)

Find returns the first element for which f returns true

func (SliceFloat64) FindIndex

func (s SliceFloat64) FindIndex(f func(el float64) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceFloat64) GroupByBool

func (s SliceFloat64) GroupByBool(f func(el float64) bool) map[bool][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByByte

func (s SliceFloat64) GroupByByte(f func(el float64) byte) map[byte][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByError

func (s SliceFloat64) GroupByError(f func(el float64) error) map[error][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByFloat32

func (s SliceFloat64) GroupByFloat32(f func(el float64) float32) map[float32][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByFloat64

func (s SliceFloat64) GroupByFloat64(f func(el float64) float64) map[float64][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByInt

func (s SliceFloat64) GroupByInt(f func(el float64) int) map[int][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByInt16

func (s SliceFloat64) GroupByInt16(f func(el float64) int16) map[int16][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByInt32

func (s SliceFloat64) GroupByInt32(f func(el float64) int32) map[int32][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByInt64

func (s SliceFloat64) GroupByInt64(f func(el float64) int64) map[int64][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByInt8

func (s SliceFloat64) GroupByInt8(f func(el float64) int8) map[int8][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByInterface

func (s SliceFloat64) GroupByInterface(f func(el float64) interface{}) map[interface{}][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByRune

func (s SliceFloat64) GroupByRune(f func(el float64) rune) map[rune][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByString

func (s SliceFloat64) GroupByString(f func(el float64) string) map[string][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByUint

func (s SliceFloat64) GroupByUint(f func(el float64) uint) map[uint][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByUint16

func (s SliceFloat64) GroupByUint16(f func(el float64) uint16) map[uint16][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByUint32

func (s SliceFloat64) GroupByUint32(f func(el float64) uint32) map[uint32][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByUint64

func (s SliceFloat64) GroupByUint64(f func(el float64) uint64) map[uint64][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) GroupByUint8

func (s SliceFloat64) GroupByUint8(f func(el float64) uint8) map[uint8][]float64

GroupBy groups element from array by value returned by f

func (SliceFloat64) InsertAt

func (s SliceFloat64) InsertAt(index int, element float64) ([]float64, error)

InsertAt returns the slice with element inserted at given index.

func (SliceFloat64) Intersperse

func (s SliceFloat64) Intersperse(el float64) []float64

Intersperse inserts el between each element of arr

func (SliceFloat64) Last

func (s SliceFloat64) Last() (float64, error)

Last returns the last element from the slice

func (SliceFloat64) MapBool

func (s SliceFloat64) MapBool(f func(el float64) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapByte

func (s SliceFloat64) MapByte(f func(el float64) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapError

func (s SliceFloat64) MapError(f func(el float64) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapFloat32

func (s SliceFloat64) MapFloat32(f func(el float64) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapFloat64

func (s SliceFloat64) MapFloat64(f func(el float64) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapInt

func (s SliceFloat64) MapInt(f func(el float64) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapInt16

func (s SliceFloat64) MapInt16(f func(el float64) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapInt32

func (s SliceFloat64) MapInt32(f func(el float64) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapInt64

func (s SliceFloat64) MapInt64(f func(el float64) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapInt8

func (s SliceFloat64) MapInt8(f func(el float64) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapInterface

func (s SliceFloat64) MapInterface(f func(el float64) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapRune

func (s SliceFloat64) MapRune(f func(el float64) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapString

func (s SliceFloat64) MapString(f func(el float64) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapUint

func (s SliceFloat64) MapUint(f func(el float64) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapUint16

func (s SliceFloat64) MapUint16(f func(el float64) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapUint32

func (s SliceFloat64) MapUint32(f func(el float64) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapUint64

func (s SliceFloat64) MapUint64(f func(el float64) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) MapUint8

func (s SliceFloat64) MapUint8(f func(el float64) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceFloat64) Max

func (s SliceFloat64) Max() (float64, error)

Max returns the maximal element from arr

func (SliceFloat64) Min

func (s SliceFloat64) Min() (float64, error)

Min returns the minimal element from arr

func (SliceFloat64) Permutations

func (s SliceFloat64) Permutations(size int) chan []float64

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceFloat64) Product

func (s SliceFloat64) Product(repeat int) chan []float64

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceFloat64) ReduceBool

func (s SliceFloat64) ReduceBool(acc bool, f func(el float64, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceByte

func (s SliceFloat64) ReduceByte(acc byte, f func(el float64, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceError

func (s SliceFloat64) ReduceError(acc error, f func(el float64, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceFloat32

func (s SliceFloat64) ReduceFloat32(acc float32, f func(el float64, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceFloat64

func (s SliceFloat64) ReduceFloat64(acc float64, f func(el float64, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceInt

func (s SliceFloat64) ReduceInt(acc int, f func(el float64, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceInt16

func (s SliceFloat64) ReduceInt16(acc int16, f func(el float64, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceInt32

func (s SliceFloat64) ReduceInt32(acc int32, f func(el float64, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceInt64

func (s SliceFloat64) ReduceInt64(acc int64, f func(el float64, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceInt8

func (s SliceFloat64) ReduceInt8(acc int8, f func(el float64, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceInterface

func (s SliceFloat64) ReduceInterface(acc interface{}, f func(el float64, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceRune

func (s SliceFloat64) ReduceRune(acc rune, f func(el float64, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceString

func (s SliceFloat64) ReduceString(acc string, f func(el float64, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceUint

func (s SliceFloat64) ReduceUint(acc uint, f func(el float64, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceUint16

func (s SliceFloat64) ReduceUint16(acc uint16, f func(el float64, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceUint32

func (s SliceFloat64) ReduceUint32(acc uint32, f func(el float64, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceUint64

func (s SliceFloat64) ReduceUint64(acc uint64, f func(el float64, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceUint8

func (s SliceFloat64) ReduceUint8(acc uint8, f func(el float64, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceFloat64) ReduceWhileBool

func (s SliceFloat64) ReduceWhileBool(acc bool, f func(el float64, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileByte

func (s SliceFloat64) ReduceWhileByte(acc byte, f func(el float64, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileError

func (s SliceFloat64) ReduceWhileError(acc error, f func(el float64, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileFloat32

func (s SliceFloat64) ReduceWhileFloat32(acc float32, f func(el float64, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileFloat64

func (s SliceFloat64) ReduceWhileFloat64(acc float64, f func(el float64, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileInt

func (s SliceFloat64) ReduceWhileInt(acc int, f func(el float64, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileInt16

func (s SliceFloat64) ReduceWhileInt16(acc int16, f func(el float64, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileInt32

func (s SliceFloat64) ReduceWhileInt32(acc int32, f func(el float64, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileInt64

func (s SliceFloat64) ReduceWhileInt64(acc int64, f func(el float64, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileInt8

func (s SliceFloat64) ReduceWhileInt8(acc int8, f func(el float64, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileInterface

func (s SliceFloat64) ReduceWhileInterface(acc interface{}, f func(el float64, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileRune

func (s SliceFloat64) ReduceWhileRune(acc rune, f func(el float64, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileString

func (s SliceFloat64) ReduceWhileString(acc string, f func(el float64, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileUint

func (s SliceFloat64) ReduceWhileUint(acc uint, f func(el float64, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileUint16

func (s SliceFloat64) ReduceWhileUint16(acc uint16, f func(el float64, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileUint32

func (s SliceFloat64) ReduceWhileUint32(acc uint32, f func(el float64, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileUint64

func (s SliceFloat64) ReduceWhileUint64(acc uint64, f func(el float64, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) ReduceWhileUint8

func (s SliceFloat64) ReduceWhileUint8(acc uint8, f func(el float64, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceFloat64) Reverse

func (s SliceFloat64) Reverse() []float64

Reverse returns given arr in reversed order

func (SliceFloat64) Same

func (s SliceFloat64) Same() bool

Same returns true if all element in arr the same

func (SliceFloat64) ScanBool

func (s SliceFloat64) ScanBool(acc bool, f func(el float64, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanByte

func (s SliceFloat64) ScanByte(acc byte, f func(el float64, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanError

func (s SliceFloat64) ScanError(acc error, f func(el float64, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanFloat32

func (s SliceFloat64) ScanFloat32(acc float32, f func(el float64, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanFloat64

func (s SliceFloat64) ScanFloat64(acc float64, f func(el float64, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanInt

func (s SliceFloat64) ScanInt(acc int, f func(el float64, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanInt16

func (s SliceFloat64) ScanInt16(acc int16, f func(el float64, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanInt32

func (s SliceFloat64) ScanInt32(acc int32, f func(el float64, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanInt64

func (s SliceFloat64) ScanInt64(acc int64, f func(el float64, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanInt8

func (s SliceFloat64) ScanInt8(acc int8, f func(el float64, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanInterface

func (s SliceFloat64) ScanInterface(acc interface{}, f func(el float64, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanRune

func (s SliceFloat64) ScanRune(acc rune, f func(el float64, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanString

func (s SliceFloat64) ScanString(acc string, f func(el float64, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanUint

func (s SliceFloat64) ScanUint(acc uint, f func(el float64, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanUint16

func (s SliceFloat64) ScanUint16(acc uint16, f func(el float64, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanUint32

func (s SliceFloat64) ScanUint32(acc uint32, f func(el float64, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanUint64

func (s SliceFloat64) ScanUint64(acc uint64, f func(el float64, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) ScanUint8

func (s SliceFloat64) ScanUint8(acc uint8, f func(el float64, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceFloat64) Shuffle

func (s SliceFloat64) Shuffle(seed int64) []float64

Shuffle in random order arr elements

func (SliceFloat64) Sort

func (s SliceFloat64) Sort() []float64

Sort returns sorted slice

func (SliceFloat64) Sorted

func (s SliceFloat64) Sorted() bool

Sorted returns true if slice is sorted

func (SliceFloat64) Split

func (s SliceFloat64) Split(sep float64) [][]float64

Split splits arr by sep

func (SliceFloat64) StartsWith

func (s SliceFloat64) StartsWith(prefix []float64) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceFloat64) Sum

func (s SliceFloat64) Sum() float64

Sum return sum of all elements from arr

func (SliceFloat64) TakeEvery

func (s SliceFloat64) TakeEvery(nth int, from int) ([]float64, error)

TakeEvery returns slice of every nth elements

func (SliceFloat64) TakeRandom

func (s SliceFloat64) TakeRandom(count int, seed int64) ([]float64, error)

TakeRandom returns slice of count random elements from the slice

func (SliceFloat64) TakeWhile

func (s SliceFloat64) TakeWhile(f func(el float64) bool) []float64

TakeWhile takes elements from arr while f returns true

func (SliceFloat64) ToChannel

func (s SliceFloat64) ToChannel() chan float64

ToChannel returns channel with elements from the slice

func (SliceFloat64) Uniq

func (s SliceFloat64) Uniq() []float64

Uniq returns arr with only first occurences of every element.

func (SliceFloat64) Window

func (s SliceFloat64) Window(size int) ([][]float64, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceFloat64) Without

func (s SliceFloat64) Without(elements ...float64) []float64

Without returns the slice with filtered out element

type SliceInt

type SliceInt struct {
	Data []int
}

Slice is a set of operations to work with slice

func (SliceInt) All

func (s SliceInt) All(f func(el int) bool) bool

All returns true if f returns true for all elements in arr

func (SliceInt) Any

func (s SliceInt) Any(f func(el int) bool) bool

Any returns true if f returns true for any element in arr

func (SliceInt) Choice

func (s SliceInt) Choice(seed int64) (int, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceInt) ChunkByBool

func (s SliceInt) ChunkByBool(f func(el int) bool) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByByte

func (s SliceInt) ChunkByByte(f func(el int) byte) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByError

func (s SliceInt) ChunkByError(f func(el int) error) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByFloat32

func (s SliceInt) ChunkByFloat32(f func(el int) float32) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByFloat64

func (s SliceInt) ChunkByFloat64(f func(el int) float64) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByInt

func (s SliceInt) ChunkByInt(f func(el int) int) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByInt16

func (s SliceInt) ChunkByInt16(f func(el int) int16) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByInt32

func (s SliceInt) ChunkByInt32(f func(el int) int32) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByInt64

func (s SliceInt) ChunkByInt64(f func(el int) int64) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByInt8

func (s SliceInt) ChunkByInt8(f func(el int) int8) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByInterface

func (s SliceInt) ChunkByInterface(f func(el int) interface{}) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByRune

func (s SliceInt) ChunkByRune(f func(el int) rune) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByString

func (s SliceInt) ChunkByString(f func(el int) string) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByUint

func (s SliceInt) ChunkByUint(f func(el int) uint) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByUint16

func (s SliceInt) ChunkByUint16(f func(el int) uint16) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByUint32

func (s SliceInt) ChunkByUint32(f func(el int) uint32) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByUint64

func (s SliceInt) ChunkByUint64(f func(el int) uint64) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkByUint8

func (s SliceInt) ChunkByUint8(f func(el int) uint8) [][]int

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt) ChunkEvery

func (s SliceInt) ChunkEvery(count int) ([][]int, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceInt) Contains

func (s SliceInt) Contains(el int) bool

Contains returns true if el in arr.

func (SliceInt) Count

func (s SliceInt) Count(el int) int

Count return count of el occurences in arr.

func (SliceInt) CountBy

func (s SliceInt) CountBy(f func(el int) bool) int

CountBy returns how many times f returns true.

func (SliceInt) Cycle

func (s SliceInt) Cycle() chan int

Cycle is an infinite loop over slice

func (SliceInt) Dedup

func (s SliceInt) Dedup() []int

Dedup returns a given slice without consecutive duplicated elements

func (SliceInt) DedupByBool

func (s SliceInt) DedupByBool(f func(el int) bool) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByByte

func (s SliceInt) DedupByByte(f func(el int) byte) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByError

func (s SliceInt) DedupByError(f func(el int) error) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByFloat32

func (s SliceInt) DedupByFloat32(f func(el int) float32) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByFloat64

func (s SliceInt) DedupByFloat64(f func(el int) float64) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByInt

func (s SliceInt) DedupByInt(f func(el int) int) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByInt16

func (s SliceInt) DedupByInt16(f func(el int) int16) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByInt32

func (s SliceInt) DedupByInt32(f func(el int) int32) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByInt64

func (s SliceInt) DedupByInt64(f func(el int) int64) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByInt8

func (s SliceInt) DedupByInt8(f func(el int) int8) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByInterface

func (s SliceInt) DedupByInterface(f func(el int) interface{}) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByRune

func (s SliceInt) DedupByRune(f func(el int) rune) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByString

func (s SliceInt) DedupByString(f func(el int) string) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByUint

func (s SliceInt) DedupByUint(f func(el int) uint) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByUint16

func (s SliceInt) DedupByUint16(f func(el int) uint16) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByUint32

func (s SliceInt) DedupByUint32(f func(el int) uint32) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByUint64

func (s SliceInt) DedupByUint64(f func(el int) uint64) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) DedupByUint8

func (s SliceInt) DedupByUint8(f func(el int) uint8) []int

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt) Delete

func (s SliceInt) Delete(element int) []int

Delete deletes the first occurence of the element from the slice

func (SliceInt) DeleteAll

func (s SliceInt) DeleteAll(element int) []int

DeleteAll deletes all occurences of the element from the slice

func (SliceInt) DeleteAt

func (s SliceInt) DeleteAt(indices ...int) ([]int, error)

DeleteAt returns the slice without elements on given positions

func (SliceInt) DropEvery

func (s SliceInt) DropEvery(nth int, from int) ([]int, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceInt) DropWhile

func (s SliceInt) DropWhile(f func(el int) bool) []int

DropWhile drops elements from arr while f returns true

func (SliceInt) Each

func (s SliceInt) Each(f func(el int))

Each calls f for every element from arr

func (SliceInt) EndsWith

func (s SliceInt) EndsWith(suffix []int) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceInt) Equal

func (s SliceInt) Equal(other []int) bool

Equal returns true if slices are equal

func (SliceInt) Filter

func (s SliceInt) Filter(f func(el int) bool) []int

Filter returns slice of T for which F returned true

func (SliceInt) Find

func (s SliceInt) Find(f func(el int) bool) (int, error)

Find returns the first element for which f returns true

func (SliceInt) FindIndex

func (s SliceInt) FindIndex(f func(el int) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceInt) GroupByBool

func (s SliceInt) GroupByBool(f func(el int) bool) map[bool][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByByte

func (s SliceInt) GroupByByte(f func(el int) byte) map[byte][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByError

func (s SliceInt) GroupByError(f func(el int) error) map[error][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByFloat32

func (s SliceInt) GroupByFloat32(f func(el int) float32) map[float32][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByFloat64

func (s SliceInt) GroupByFloat64(f func(el int) float64) map[float64][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByInt

func (s SliceInt) GroupByInt(f func(el int) int) map[int][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByInt16

func (s SliceInt) GroupByInt16(f func(el int) int16) map[int16][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByInt32

func (s SliceInt) GroupByInt32(f func(el int) int32) map[int32][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByInt64

func (s SliceInt) GroupByInt64(f func(el int) int64) map[int64][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByInt8

func (s SliceInt) GroupByInt8(f func(el int) int8) map[int8][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByInterface

func (s SliceInt) GroupByInterface(f func(el int) interface{}) map[interface{}][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByRune

func (s SliceInt) GroupByRune(f func(el int) rune) map[rune][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByString

func (s SliceInt) GroupByString(f func(el int) string) map[string][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByUint

func (s SliceInt) GroupByUint(f func(el int) uint) map[uint][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByUint16

func (s SliceInt) GroupByUint16(f func(el int) uint16) map[uint16][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByUint32

func (s SliceInt) GroupByUint32(f func(el int) uint32) map[uint32][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByUint64

func (s SliceInt) GroupByUint64(f func(el int) uint64) map[uint64][]int

GroupBy groups element from array by value returned by f

func (SliceInt) GroupByUint8

func (s SliceInt) GroupByUint8(f func(el int) uint8) map[uint8][]int

GroupBy groups element from array by value returned by f

func (SliceInt) InsertAt

func (s SliceInt) InsertAt(index int, element int) ([]int, error)

InsertAt returns the slice with element inserted at given index.

func (SliceInt) Intersperse

func (s SliceInt) Intersperse(el int) []int

Intersperse inserts el between each element of arr

func (SliceInt) Join

func (s SliceInt) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceInt) Last

func (s SliceInt) Last() (int, error)

Last returns the last element from the slice

func (SliceInt) MapBool

func (s SliceInt) MapBool(f func(el int) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapByte

func (s SliceInt) MapByte(f func(el int) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapError

func (s SliceInt) MapError(f func(el int) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapFloat32

func (s SliceInt) MapFloat32(f func(el int) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapFloat64

func (s SliceInt) MapFloat64(f func(el int) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapInt

func (s SliceInt) MapInt(f func(el int) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapInt16

func (s SliceInt) MapInt16(f func(el int) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapInt32

func (s SliceInt) MapInt32(f func(el int) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapInt64

func (s SliceInt) MapInt64(f func(el int) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapInt8

func (s SliceInt) MapInt8(f func(el int) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapInterface

func (s SliceInt) MapInterface(f func(el int) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapRune

func (s SliceInt) MapRune(f func(el int) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapString

func (s SliceInt) MapString(f func(el int) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapUint

func (s SliceInt) MapUint(f func(el int) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapUint16

func (s SliceInt) MapUint16(f func(el int) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapUint32

func (s SliceInt) MapUint32(f func(el int) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapUint64

func (s SliceInt) MapUint64(f func(el int) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) MapUint8

func (s SliceInt) MapUint8(f func(el int) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt) Max

func (s SliceInt) Max() (int, error)

Max returns the maximal element from arr

func (SliceInt) Min

func (s SliceInt) Min() (int, error)

Min returns the minimal element from arr

func (SliceInt) Permutations

func (s SliceInt) Permutations(size int) chan []int

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceInt) Product

func (s SliceInt) Product(repeat int) chan []int

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceInt) ReduceBool

func (s SliceInt) ReduceBool(acc bool, f func(el int, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceByte

func (s SliceInt) ReduceByte(acc byte, f func(el int, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceError

func (s SliceInt) ReduceError(acc error, f func(el int, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceFloat32

func (s SliceInt) ReduceFloat32(acc float32, f func(el int, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceFloat64

func (s SliceInt) ReduceFloat64(acc float64, f func(el int, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceInt

func (s SliceInt) ReduceInt(acc int, f func(el int, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceInt16

func (s SliceInt) ReduceInt16(acc int16, f func(el int, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceInt32

func (s SliceInt) ReduceInt32(acc int32, f func(el int, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceInt64

func (s SliceInt) ReduceInt64(acc int64, f func(el int, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceInt8

func (s SliceInt) ReduceInt8(acc int8, f func(el int, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceInterface

func (s SliceInt) ReduceInterface(acc interface{}, f func(el int, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceRune

func (s SliceInt) ReduceRune(acc rune, f func(el int, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceString

func (s SliceInt) ReduceString(acc string, f func(el int, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceUint

func (s SliceInt) ReduceUint(acc uint, f func(el int, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceUint16

func (s SliceInt) ReduceUint16(acc uint16, f func(el int, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceUint32

func (s SliceInt) ReduceUint32(acc uint32, f func(el int, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceUint64

func (s SliceInt) ReduceUint64(acc uint64, f func(el int, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceUint8

func (s SliceInt) ReduceUint8(acc uint8, f func(el int, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt) ReduceWhileBool

func (s SliceInt) ReduceWhileBool(acc bool, f func(el int, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileByte

func (s SliceInt) ReduceWhileByte(acc byte, f func(el int, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileError

func (s SliceInt) ReduceWhileError(acc error, f func(el int, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileFloat32

func (s SliceInt) ReduceWhileFloat32(acc float32, f func(el int, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileFloat64

func (s SliceInt) ReduceWhileFloat64(acc float64, f func(el int, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileInt

func (s SliceInt) ReduceWhileInt(acc int, f func(el int, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileInt16

func (s SliceInt) ReduceWhileInt16(acc int16, f func(el int, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileInt32

func (s SliceInt) ReduceWhileInt32(acc int32, f func(el int, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileInt64

func (s SliceInt) ReduceWhileInt64(acc int64, f func(el int, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileInt8

func (s SliceInt) ReduceWhileInt8(acc int8, f func(el int, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileInterface

func (s SliceInt) ReduceWhileInterface(acc interface{}, f func(el int, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileRune

func (s SliceInt) ReduceWhileRune(acc rune, f func(el int, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileString

func (s SliceInt) ReduceWhileString(acc string, f func(el int, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileUint

func (s SliceInt) ReduceWhileUint(acc uint, f func(el int, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileUint16

func (s SliceInt) ReduceWhileUint16(acc uint16, f func(el int, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileUint32

func (s SliceInt) ReduceWhileUint32(acc uint32, f func(el int, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileUint64

func (s SliceInt) ReduceWhileUint64(acc uint64, f func(el int, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) ReduceWhileUint8

func (s SliceInt) ReduceWhileUint8(acc uint8, f func(el int, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt) Reverse

func (s SliceInt) Reverse() []int

Reverse returns given arr in reversed order

func (SliceInt) Same

func (s SliceInt) Same() bool

Same returns true if all element in arr the same

func (SliceInt) ScanBool

func (s SliceInt) ScanBool(acc bool, f func(el int, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanByte

func (s SliceInt) ScanByte(acc byte, f func(el int, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanError

func (s SliceInt) ScanError(acc error, f func(el int, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanFloat32

func (s SliceInt) ScanFloat32(acc float32, f func(el int, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanFloat64

func (s SliceInt) ScanFloat64(acc float64, f func(el int, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanInt

func (s SliceInt) ScanInt(acc int, f func(el int, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanInt16

func (s SliceInt) ScanInt16(acc int16, f func(el int, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanInt32

func (s SliceInt) ScanInt32(acc int32, f func(el int, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanInt64

func (s SliceInt) ScanInt64(acc int64, f func(el int, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanInt8

func (s SliceInt) ScanInt8(acc int8, f func(el int, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanInterface

func (s SliceInt) ScanInterface(acc interface{}, f func(el int, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanRune

func (s SliceInt) ScanRune(acc rune, f func(el int, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanString

func (s SliceInt) ScanString(acc string, f func(el int, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanUint

func (s SliceInt) ScanUint(acc uint, f func(el int, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanUint16

func (s SliceInt) ScanUint16(acc uint16, f func(el int, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanUint32

func (s SliceInt) ScanUint32(acc uint32, f func(el int, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanUint64

func (s SliceInt) ScanUint64(acc uint64, f func(el int, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceInt) ScanUint8

func (s SliceInt) ScanUint8(acc uint8, f func(el int, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceInt) Shuffle

func (s SliceInt) Shuffle(seed int64) []int

Shuffle in random order arr elements

func (SliceInt) Sort

func (s SliceInt) Sort() []int

Sort returns sorted slice

func (SliceInt) Sorted

func (s SliceInt) Sorted() bool

Sorted returns true if slice is sorted

func (SliceInt) Split

func (s SliceInt) Split(sep int) [][]int

Split splits arr by sep

func (SliceInt) StartsWith

func (s SliceInt) StartsWith(prefix []int) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceInt) Sum

func (s SliceInt) Sum() int

Sum return sum of all elements from arr

func (SliceInt) TakeEvery

func (s SliceInt) TakeEvery(nth int, from int) ([]int, error)

TakeEvery returns slice of every nth elements

func (SliceInt) TakeRandom

func (s SliceInt) TakeRandom(count int, seed int64) ([]int, error)

TakeRandom returns slice of count random elements from the slice

func (SliceInt) TakeWhile

func (s SliceInt) TakeWhile(f func(el int) bool) []int

TakeWhile takes elements from arr while f returns true

func (SliceInt) ToChannel

func (s SliceInt) ToChannel() chan int

ToChannel returns channel with elements from the slice

func (SliceInt) Uniq

func (s SliceInt) Uniq() []int

Uniq returns arr with only first occurences of every element.

func (SliceInt) Window

func (s SliceInt) Window(size int) ([][]int, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceInt) Without

func (s SliceInt) Without(elements ...int) []int

Without returns the slice with filtered out element

type SliceInt16

type SliceInt16 struct {
	Data []int16
}

Slice is a set of operations to work with slice

func (SliceInt16) All

func (s SliceInt16) All(f func(el int16) bool) bool

All returns true if f returns true for all elements in arr

func (SliceInt16) Any

func (s SliceInt16) Any(f func(el int16) bool) bool

Any returns true if f returns true for any element in arr

func (SliceInt16) Choice

func (s SliceInt16) Choice(seed int64) (int16, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceInt16) ChunkByBool

func (s SliceInt16) ChunkByBool(f func(el int16) bool) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByByte

func (s SliceInt16) ChunkByByte(f func(el int16) byte) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByError

func (s SliceInt16) ChunkByError(f func(el int16) error) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByFloat32

func (s SliceInt16) ChunkByFloat32(f func(el int16) float32) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByFloat64

func (s SliceInt16) ChunkByFloat64(f func(el int16) float64) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByInt

func (s SliceInt16) ChunkByInt(f func(el int16) int) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByInt16

func (s SliceInt16) ChunkByInt16(f func(el int16) int16) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByInt32

func (s SliceInt16) ChunkByInt32(f func(el int16) int32) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByInt64

func (s SliceInt16) ChunkByInt64(f func(el int16) int64) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByInt8

func (s SliceInt16) ChunkByInt8(f func(el int16) int8) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByInterface

func (s SliceInt16) ChunkByInterface(f func(el int16) interface{}) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByRune

func (s SliceInt16) ChunkByRune(f func(el int16) rune) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByString

func (s SliceInt16) ChunkByString(f func(el int16) string) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByUint

func (s SliceInt16) ChunkByUint(f func(el int16) uint) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByUint16

func (s SliceInt16) ChunkByUint16(f func(el int16) uint16) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByUint32

func (s SliceInt16) ChunkByUint32(f func(el int16) uint32) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByUint64

func (s SliceInt16) ChunkByUint64(f func(el int16) uint64) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkByUint8

func (s SliceInt16) ChunkByUint8(f func(el int16) uint8) [][]int16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt16) ChunkEvery

func (s SliceInt16) ChunkEvery(count int) ([][]int16, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceInt16) Contains

func (s SliceInt16) Contains(el int16) bool

Contains returns true if el in arr.

func (SliceInt16) Count

func (s SliceInt16) Count(el int16) int

Count return count of el occurences in arr.

func (SliceInt16) CountBy

func (s SliceInt16) CountBy(f func(el int16) bool) int

CountBy returns how many times f returns true.

func (SliceInt16) Cycle

func (s SliceInt16) Cycle() chan int16

Cycle is an infinite loop over slice

func (SliceInt16) Dedup

func (s SliceInt16) Dedup() []int16

Dedup returns a given slice without consecutive duplicated elements

func (SliceInt16) DedupByBool

func (s SliceInt16) DedupByBool(f func(el int16) bool) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByByte

func (s SliceInt16) DedupByByte(f func(el int16) byte) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByError

func (s SliceInt16) DedupByError(f func(el int16) error) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByFloat32

func (s SliceInt16) DedupByFloat32(f func(el int16) float32) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByFloat64

func (s SliceInt16) DedupByFloat64(f func(el int16) float64) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByInt

func (s SliceInt16) DedupByInt(f func(el int16) int) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByInt16

func (s SliceInt16) DedupByInt16(f func(el int16) int16) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByInt32

func (s SliceInt16) DedupByInt32(f func(el int16) int32) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByInt64

func (s SliceInt16) DedupByInt64(f func(el int16) int64) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByInt8

func (s SliceInt16) DedupByInt8(f func(el int16) int8) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByInterface

func (s SliceInt16) DedupByInterface(f func(el int16) interface{}) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByRune

func (s SliceInt16) DedupByRune(f func(el int16) rune) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByString

func (s SliceInt16) DedupByString(f func(el int16) string) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByUint

func (s SliceInt16) DedupByUint(f func(el int16) uint) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByUint16

func (s SliceInt16) DedupByUint16(f func(el int16) uint16) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByUint32

func (s SliceInt16) DedupByUint32(f func(el int16) uint32) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByUint64

func (s SliceInt16) DedupByUint64(f func(el int16) uint64) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) DedupByUint8

func (s SliceInt16) DedupByUint8(f func(el int16) uint8) []int16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt16) Delete

func (s SliceInt16) Delete(element int16) []int16

Delete deletes the first occurence of the element from the slice

func (SliceInt16) DeleteAll

func (s SliceInt16) DeleteAll(element int16) []int16

DeleteAll deletes all occurences of the element from the slice

func (SliceInt16) DeleteAt

func (s SliceInt16) DeleteAt(indices ...int) ([]int16, error)

DeleteAt returns the slice without elements on given positions

func (SliceInt16) DropEvery

func (s SliceInt16) DropEvery(nth int, from int) ([]int16, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceInt16) DropWhile

func (s SliceInt16) DropWhile(f func(el int16) bool) []int16

DropWhile drops elements from arr while f returns true

func (SliceInt16) Each

func (s SliceInt16) Each(f func(el int16))

Each calls f for every element from arr

func (SliceInt16) EndsWith

func (s SliceInt16) EndsWith(suffix []int16) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceInt16) Equal

func (s SliceInt16) Equal(other []int16) bool

Equal returns true if slices are equal

func (SliceInt16) Filter

func (s SliceInt16) Filter(f func(el int16) bool) []int16

Filter returns slice of T for which F returned true

func (SliceInt16) Find

func (s SliceInt16) Find(f func(el int16) bool) (int16, error)

Find returns the first element for which f returns true

func (SliceInt16) FindIndex

func (s SliceInt16) FindIndex(f func(el int16) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceInt16) GroupByBool

func (s SliceInt16) GroupByBool(f func(el int16) bool) map[bool][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByByte

func (s SliceInt16) GroupByByte(f func(el int16) byte) map[byte][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByError

func (s SliceInt16) GroupByError(f func(el int16) error) map[error][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByFloat32

func (s SliceInt16) GroupByFloat32(f func(el int16) float32) map[float32][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByFloat64

func (s SliceInt16) GroupByFloat64(f func(el int16) float64) map[float64][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByInt

func (s SliceInt16) GroupByInt(f func(el int16) int) map[int][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByInt16

func (s SliceInt16) GroupByInt16(f func(el int16) int16) map[int16][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByInt32

func (s SliceInt16) GroupByInt32(f func(el int16) int32) map[int32][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByInt64

func (s SliceInt16) GroupByInt64(f func(el int16) int64) map[int64][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByInt8

func (s SliceInt16) GroupByInt8(f func(el int16) int8) map[int8][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByInterface

func (s SliceInt16) GroupByInterface(f func(el int16) interface{}) map[interface{}][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByRune

func (s SliceInt16) GroupByRune(f func(el int16) rune) map[rune][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByString

func (s SliceInt16) GroupByString(f func(el int16) string) map[string][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByUint

func (s SliceInt16) GroupByUint(f func(el int16) uint) map[uint][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByUint16

func (s SliceInt16) GroupByUint16(f func(el int16) uint16) map[uint16][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByUint32

func (s SliceInt16) GroupByUint32(f func(el int16) uint32) map[uint32][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByUint64

func (s SliceInt16) GroupByUint64(f func(el int16) uint64) map[uint64][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) GroupByUint8

func (s SliceInt16) GroupByUint8(f func(el int16) uint8) map[uint8][]int16

GroupBy groups element from array by value returned by f

func (SliceInt16) InsertAt

func (s SliceInt16) InsertAt(index int, element int16) ([]int16, error)

InsertAt returns the slice with element inserted at given index.

func (SliceInt16) Intersperse

func (s SliceInt16) Intersperse(el int16) []int16

Intersperse inserts el between each element of arr

func (SliceInt16) Join

func (s SliceInt16) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceInt16) Last

func (s SliceInt16) Last() (int16, error)

Last returns the last element from the slice

func (SliceInt16) MapBool

func (s SliceInt16) MapBool(f func(el int16) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapByte

func (s SliceInt16) MapByte(f func(el int16) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapError

func (s SliceInt16) MapError(f func(el int16) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapFloat32

func (s SliceInt16) MapFloat32(f func(el int16) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapFloat64

func (s SliceInt16) MapFloat64(f func(el int16) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapInt

func (s SliceInt16) MapInt(f func(el int16) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapInt16

func (s SliceInt16) MapInt16(f func(el int16) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapInt32

func (s SliceInt16) MapInt32(f func(el int16) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapInt64

func (s SliceInt16) MapInt64(f func(el int16) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapInt8

func (s SliceInt16) MapInt8(f func(el int16) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapInterface

func (s SliceInt16) MapInterface(f func(el int16) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapRune

func (s SliceInt16) MapRune(f func(el int16) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapString

func (s SliceInt16) MapString(f func(el int16) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapUint

func (s SliceInt16) MapUint(f func(el int16) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapUint16

func (s SliceInt16) MapUint16(f func(el int16) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapUint32

func (s SliceInt16) MapUint32(f func(el int16) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapUint64

func (s SliceInt16) MapUint64(f func(el int16) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) MapUint8

func (s SliceInt16) MapUint8(f func(el int16) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt16) Max

func (s SliceInt16) Max() (int16, error)

Max returns the maximal element from arr

func (SliceInt16) Min

func (s SliceInt16) Min() (int16, error)

Min returns the minimal element from arr

func (SliceInt16) Permutations

func (s SliceInt16) Permutations(size int) chan []int16

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceInt16) Product

func (s SliceInt16) Product(repeat int) chan []int16

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceInt16) ReduceBool

func (s SliceInt16) ReduceBool(acc bool, f func(el int16, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceByte

func (s SliceInt16) ReduceByte(acc byte, f func(el int16, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceError

func (s SliceInt16) ReduceError(acc error, f func(el int16, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceFloat32

func (s SliceInt16) ReduceFloat32(acc float32, f func(el int16, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceFloat64

func (s SliceInt16) ReduceFloat64(acc float64, f func(el int16, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceInt

func (s SliceInt16) ReduceInt(acc int, f func(el int16, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceInt16

func (s SliceInt16) ReduceInt16(acc int16, f func(el int16, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceInt32

func (s SliceInt16) ReduceInt32(acc int32, f func(el int16, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceInt64

func (s SliceInt16) ReduceInt64(acc int64, f func(el int16, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceInt8

func (s SliceInt16) ReduceInt8(acc int8, f func(el int16, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceInterface

func (s SliceInt16) ReduceInterface(acc interface{}, f func(el int16, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceRune

func (s SliceInt16) ReduceRune(acc rune, f func(el int16, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceString

func (s SliceInt16) ReduceString(acc string, f func(el int16, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceUint

func (s SliceInt16) ReduceUint(acc uint, f func(el int16, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceUint16

func (s SliceInt16) ReduceUint16(acc uint16, f func(el int16, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceUint32

func (s SliceInt16) ReduceUint32(acc uint32, f func(el int16, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceUint64

func (s SliceInt16) ReduceUint64(acc uint64, f func(el int16, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceUint8

func (s SliceInt16) ReduceUint8(acc uint8, f func(el int16, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt16) ReduceWhileBool

func (s SliceInt16) ReduceWhileBool(acc bool, f func(el int16, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileByte

func (s SliceInt16) ReduceWhileByte(acc byte, f func(el int16, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileError

func (s SliceInt16) ReduceWhileError(acc error, f func(el int16, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileFloat32

func (s SliceInt16) ReduceWhileFloat32(acc float32, f func(el int16, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileFloat64

func (s SliceInt16) ReduceWhileFloat64(acc float64, f func(el int16, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileInt

func (s SliceInt16) ReduceWhileInt(acc int, f func(el int16, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileInt16

func (s SliceInt16) ReduceWhileInt16(acc int16, f func(el int16, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileInt32

func (s SliceInt16) ReduceWhileInt32(acc int32, f func(el int16, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileInt64

func (s SliceInt16) ReduceWhileInt64(acc int64, f func(el int16, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileInt8

func (s SliceInt16) ReduceWhileInt8(acc int8, f func(el int16, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileInterface

func (s SliceInt16) ReduceWhileInterface(acc interface{}, f func(el int16, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileRune

func (s SliceInt16) ReduceWhileRune(acc rune, f func(el int16, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileString

func (s SliceInt16) ReduceWhileString(acc string, f func(el int16, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileUint

func (s SliceInt16) ReduceWhileUint(acc uint, f func(el int16, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileUint16

func (s SliceInt16) ReduceWhileUint16(acc uint16, f func(el int16, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileUint32

func (s SliceInt16) ReduceWhileUint32(acc uint32, f func(el int16, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileUint64

func (s SliceInt16) ReduceWhileUint64(acc uint64, f func(el int16, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) ReduceWhileUint8

func (s SliceInt16) ReduceWhileUint8(acc uint8, f func(el int16, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt16) Reverse

func (s SliceInt16) Reverse() []int16

Reverse returns given arr in reversed order

func (SliceInt16) Same

func (s SliceInt16) Same() bool

Same returns true if all element in arr the same

func (SliceInt16) ScanBool

func (s SliceInt16) ScanBool(acc bool, f func(el int16, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanByte

func (s SliceInt16) ScanByte(acc byte, f func(el int16, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanError

func (s SliceInt16) ScanError(acc error, f func(el int16, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanFloat32

func (s SliceInt16) ScanFloat32(acc float32, f func(el int16, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanFloat64

func (s SliceInt16) ScanFloat64(acc float64, f func(el int16, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanInt

func (s SliceInt16) ScanInt(acc int, f func(el int16, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanInt16

func (s SliceInt16) ScanInt16(acc int16, f func(el int16, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanInt32

func (s SliceInt16) ScanInt32(acc int32, f func(el int16, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanInt64

func (s SliceInt16) ScanInt64(acc int64, f func(el int16, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanInt8

func (s SliceInt16) ScanInt8(acc int8, f func(el int16, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanInterface

func (s SliceInt16) ScanInterface(acc interface{}, f func(el int16, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanRune

func (s SliceInt16) ScanRune(acc rune, f func(el int16, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanString

func (s SliceInt16) ScanString(acc string, f func(el int16, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanUint

func (s SliceInt16) ScanUint(acc uint, f func(el int16, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanUint16

func (s SliceInt16) ScanUint16(acc uint16, f func(el int16, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanUint32

func (s SliceInt16) ScanUint32(acc uint32, f func(el int16, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanUint64

func (s SliceInt16) ScanUint64(acc uint64, f func(el int16, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceInt16) ScanUint8

func (s SliceInt16) ScanUint8(acc uint8, f func(el int16, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceInt16) Shuffle

func (s SliceInt16) Shuffle(seed int64) []int16

Shuffle in random order arr elements

func (SliceInt16) Sort

func (s SliceInt16) Sort() []int16

Sort returns sorted slice

func (SliceInt16) Sorted

func (s SliceInt16) Sorted() bool

Sorted returns true if slice is sorted

func (SliceInt16) Split

func (s SliceInt16) Split(sep int16) [][]int16

Split splits arr by sep

func (SliceInt16) StartsWith

func (s SliceInt16) StartsWith(prefix []int16) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceInt16) Sum

func (s SliceInt16) Sum() int16

Sum return sum of all elements from arr

func (SliceInt16) TakeEvery

func (s SliceInt16) TakeEvery(nth int, from int) ([]int16, error)

TakeEvery returns slice of every nth elements

func (SliceInt16) TakeRandom

func (s SliceInt16) TakeRandom(count int, seed int64) ([]int16, error)

TakeRandom returns slice of count random elements from the slice

func (SliceInt16) TakeWhile

func (s SliceInt16) TakeWhile(f func(el int16) bool) []int16

TakeWhile takes elements from arr while f returns true

func (SliceInt16) ToChannel

func (s SliceInt16) ToChannel() chan int16

ToChannel returns channel with elements from the slice

func (SliceInt16) Uniq

func (s SliceInt16) Uniq() []int16

Uniq returns arr with only first occurences of every element.

func (SliceInt16) Window

func (s SliceInt16) Window(size int) ([][]int16, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceInt16) Without

func (s SliceInt16) Without(elements ...int16) []int16

Without returns the slice with filtered out element

type SliceInt32

type SliceInt32 struct {
	Data []int32
}

Slice is a set of operations to work with slice

func (SliceInt32) All

func (s SliceInt32) All(f func(el int32) bool) bool

All returns true if f returns true for all elements in arr

func (SliceInt32) Any

func (s SliceInt32) Any(f func(el int32) bool) bool

Any returns true if f returns true for any element in arr

func (SliceInt32) Choice

func (s SliceInt32) Choice(seed int64) (int32, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceInt32) ChunkByBool

func (s SliceInt32) ChunkByBool(f func(el int32) bool) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByByte

func (s SliceInt32) ChunkByByte(f func(el int32) byte) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByError

func (s SliceInt32) ChunkByError(f func(el int32) error) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByFloat32

func (s SliceInt32) ChunkByFloat32(f func(el int32) float32) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByFloat64

func (s SliceInt32) ChunkByFloat64(f func(el int32) float64) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByInt

func (s SliceInt32) ChunkByInt(f func(el int32) int) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByInt16

func (s SliceInt32) ChunkByInt16(f func(el int32) int16) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByInt32

func (s SliceInt32) ChunkByInt32(f func(el int32) int32) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByInt64

func (s SliceInt32) ChunkByInt64(f func(el int32) int64) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByInt8

func (s SliceInt32) ChunkByInt8(f func(el int32) int8) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByInterface

func (s SliceInt32) ChunkByInterface(f func(el int32) interface{}) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByRune

func (s SliceInt32) ChunkByRune(f func(el int32) rune) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByString

func (s SliceInt32) ChunkByString(f func(el int32) string) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByUint

func (s SliceInt32) ChunkByUint(f func(el int32) uint) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByUint16

func (s SliceInt32) ChunkByUint16(f func(el int32) uint16) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByUint32

func (s SliceInt32) ChunkByUint32(f func(el int32) uint32) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByUint64

func (s SliceInt32) ChunkByUint64(f func(el int32) uint64) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkByUint8

func (s SliceInt32) ChunkByUint8(f func(el int32) uint8) [][]int32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt32) ChunkEvery

func (s SliceInt32) ChunkEvery(count int) ([][]int32, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceInt32) Contains

func (s SliceInt32) Contains(el int32) bool

Contains returns true if el in arr.

func (SliceInt32) Count

func (s SliceInt32) Count(el int32) int

Count return count of el occurences in arr.

func (SliceInt32) CountBy

func (s SliceInt32) CountBy(f func(el int32) bool) int

CountBy returns how many times f returns true.

func (SliceInt32) Cycle

func (s SliceInt32) Cycle() chan int32

Cycle is an infinite loop over slice

func (SliceInt32) Dedup

func (s SliceInt32) Dedup() []int32

Dedup returns a given slice without consecutive duplicated elements

func (SliceInt32) DedupByBool

func (s SliceInt32) DedupByBool(f func(el int32) bool) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByByte

func (s SliceInt32) DedupByByte(f func(el int32) byte) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByError

func (s SliceInt32) DedupByError(f func(el int32) error) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByFloat32

func (s SliceInt32) DedupByFloat32(f func(el int32) float32) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByFloat64

func (s SliceInt32) DedupByFloat64(f func(el int32) float64) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByInt

func (s SliceInt32) DedupByInt(f func(el int32) int) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByInt16

func (s SliceInt32) DedupByInt16(f func(el int32) int16) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByInt32

func (s SliceInt32) DedupByInt32(f func(el int32) int32) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByInt64

func (s SliceInt32) DedupByInt64(f func(el int32) int64) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByInt8

func (s SliceInt32) DedupByInt8(f func(el int32) int8) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByInterface

func (s SliceInt32) DedupByInterface(f func(el int32) interface{}) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByRune

func (s SliceInt32) DedupByRune(f func(el int32) rune) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByString

func (s SliceInt32) DedupByString(f func(el int32) string) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByUint

func (s SliceInt32) DedupByUint(f func(el int32) uint) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByUint16

func (s SliceInt32) DedupByUint16(f func(el int32) uint16) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByUint32

func (s SliceInt32) DedupByUint32(f func(el int32) uint32) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByUint64

func (s SliceInt32) DedupByUint64(f func(el int32) uint64) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) DedupByUint8

func (s SliceInt32) DedupByUint8(f func(el int32) uint8) []int32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt32) Delete

func (s SliceInt32) Delete(element int32) []int32

Delete deletes the first occurence of the element from the slice

func (SliceInt32) DeleteAll

func (s SliceInt32) DeleteAll(element int32) []int32

DeleteAll deletes all occurences of the element from the slice

func (SliceInt32) DeleteAt

func (s SliceInt32) DeleteAt(indices ...int) ([]int32, error)

DeleteAt returns the slice without elements on given positions

func (SliceInt32) DropEvery

func (s SliceInt32) DropEvery(nth int, from int) ([]int32, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceInt32) DropWhile

func (s SliceInt32) DropWhile(f func(el int32) bool) []int32

DropWhile drops elements from arr while f returns true

func (SliceInt32) Each

func (s SliceInt32) Each(f func(el int32))

Each calls f for every element from arr

func (SliceInt32) EndsWith

func (s SliceInt32) EndsWith(suffix []int32) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceInt32) Equal

func (s SliceInt32) Equal(other []int32) bool

Equal returns true if slices are equal

func (SliceInt32) Filter

func (s SliceInt32) Filter(f func(el int32) bool) []int32

Filter returns slice of T for which F returned true

func (SliceInt32) Find

func (s SliceInt32) Find(f func(el int32) bool) (int32, error)

Find returns the first element for which f returns true

func (SliceInt32) FindIndex

func (s SliceInt32) FindIndex(f func(el int32) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceInt32) GroupByBool

func (s SliceInt32) GroupByBool(f func(el int32) bool) map[bool][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByByte

func (s SliceInt32) GroupByByte(f func(el int32) byte) map[byte][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByError

func (s SliceInt32) GroupByError(f func(el int32) error) map[error][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByFloat32

func (s SliceInt32) GroupByFloat32(f func(el int32) float32) map[float32][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByFloat64

func (s SliceInt32) GroupByFloat64(f func(el int32) float64) map[float64][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByInt

func (s SliceInt32) GroupByInt(f func(el int32) int) map[int][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByInt16

func (s SliceInt32) GroupByInt16(f func(el int32) int16) map[int16][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByInt32

func (s SliceInt32) GroupByInt32(f func(el int32) int32) map[int32][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByInt64

func (s SliceInt32) GroupByInt64(f func(el int32) int64) map[int64][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByInt8

func (s SliceInt32) GroupByInt8(f func(el int32) int8) map[int8][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByInterface

func (s SliceInt32) GroupByInterface(f func(el int32) interface{}) map[interface{}][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByRune

func (s SliceInt32) GroupByRune(f func(el int32) rune) map[rune][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByString

func (s SliceInt32) GroupByString(f func(el int32) string) map[string][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByUint

func (s SliceInt32) GroupByUint(f func(el int32) uint) map[uint][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByUint16

func (s SliceInt32) GroupByUint16(f func(el int32) uint16) map[uint16][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByUint32

func (s SliceInt32) GroupByUint32(f func(el int32) uint32) map[uint32][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByUint64

func (s SliceInt32) GroupByUint64(f func(el int32) uint64) map[uint64][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) GroupByUint8

func (s SliceInt32) GroupByUint8(f func(el int32) uint8) map[uint8][]int32

GroupBy groups element from array by value returned by f

func (SliceInt32) InsertAt

func (s SliceInt32) InsertAt(index int, element int32) ([]int32, error)

InsertAt returns the slice with element inserted at given index.

func (SliceInt32) Intersperse

func (s SliceInt32) Intersperse(el int32) []int32

Intersperse inserts el between each element of arr

func (SliceInt32) Join

func (s SliceInt32) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceInt32) Last

func (s SliceInt32) Last() (int32, error)

Last returns the last element from the slice

func (SliceInt32) MapBool

func (s SliceInt32) MapBool(f func(el int32) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapByte

func (s SliceInt32) MapByte(f func(el int32) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapError

func (s SliceInt32) MapError(f func(el int32) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapFloat32

func (s SliceInt32) MapFloat32(f func(el int32) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapFloat64

func (s SliceInt32) MapFloat64(f func(el int32) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapInt

func (s SliceInt32) MapInt(f func(el int32) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapInt16

func (s SliceInt32) MapInt16(f func(el int32) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapInt32

func (s SliceInt32) MapInt32(f func(el int32) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapInt64

func (s SliceInt32) MapInt64(f func(el int32) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapInt8

func (s SliceInt32) MapInt8(f func(el int32) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapInterface

func (s SliceInt32) MapInterface(f func(el int32) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapRune

func (s SliceInt32) MapRune(f func(el int32) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapString

func (s SliceInt32) MapString(f func(el int32) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapUint

func (s SliceInt32) MapUint(f func(el int32) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapUint16

func (s SliceInt32) MapUint16(f func(el int32) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapUint32

func (s SliceInt32) MapUint32(f func(el int32) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapUint64

func (s SliceInt32) MapUint64(f func(el int32) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) MapUint8

func (s SliceInt32) MapUint8(f func(el int32) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt32) Max

func (s SliceInt32) Max() (int32, error)

Max returns the maximal element from arr

func (SliceInt32) Min

func (s SliceInt32) Min() (int32, error)

Min returns the minimal element from arr

func (SliceInt32) Permutations

func (s SliceInt32) Permutations(size int) chan []int32

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceInt32) Product

func (s SliceInt32) Product(repeat int) chan []int32

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceInt32) ReduceBool

func (s SliceInt32) ReduceBool(acc bool, f func(el int32, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceByte

func (s SliceInt32) ReduceByte(acc byte, f func(el int32, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceError

func (s SliceInt32) ReduceError(acc error, f func(el int32, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceFloat32

func (s SliceInt32) ReduceFloat32(acc float32, f func(el int32, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceFloat64

func (s SliceInt32) ReduceFloat64(acc float64, f func(el int32, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceInt

func (s SliceInt32) ReduceInt(acc int, f func(el int32, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceInt16

func (s SliceInt32) ReduceInt16(acc int16, f func(el int32, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceInt32

func (s SliceInt32) ReduceInt32(acc int32, f func(el int32, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceInt64

func (s SliceInt32) ReduceInt64(acc int64, f func(el int32, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceInt8

func (s SliceInt32) ReduceInt8(acc int8, f func(el int32, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceInterface

func (s SliceInt32) ReduceInterface(acc interface{}, f func(el int32, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceRune

func (s SliceInt32) ReduceRune(acc rune, f func(el int32, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceString

func (s SliceInt32) ReduceString(acc string, f func(el int32, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceUint

func (s SliceInt32) ReduceUint(acc uint, f func(el int32, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceUint16

func (s SliceInt32) ReduceUint16(acc uint16, f func(el int32, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceUint32

func (s SliceInt32) ReduceUint32(acc uint32, f func(el int32, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceUint64

func (s SliceInt32) ReduceUint64(acc uint64, f func(el int32, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceUint8

func (s SliceInt32) ReduceUint8(acc uint8, f func(el int32, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt32) ReduceWhileBool

func (s SliceInt32) ReduceWhileBool(acc bool, f func(el int32, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileByte

func (s SliceInt32) ReduceWhileByte(acc byte, f func(el int32, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileError

func (s SliceInt32) ReduceWhileError(acc error, f func(el int32, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileFloat32

func (s SliceInt32) ReduceWhileFloat32(acc float32, f func(el int32, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileFloat64

func (s SliceInt32) ReduceWhileFloat64(acc float64, f func(el int32, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileInt

func (s SliceInt32) ReduceWhileInt(acc int, f func(el int32, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileInt16

func (s SliceInt32) ReduceWhileInt16(acc int16, f func(el int32, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileInt32

func (s SliceInt32) ReduceWhileInt32(acc int32, f func(el int32, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileInt64

func (s SliceInt32) ReduceWhileInt64(acc int64, f func(el int32, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileInt8

func (s SliceInt32) ReduceWhileInt8(acc int8, f func(el int32, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileInterface

func (s SliceInt32) ReduceWhileInterface(acc interface{}, f func(el int32, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileRune

func (s SliceInt32) ReduceWhileRune(acc rune, f func(el int32, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileString

func (s SliceInt32) ReduceWhileString(acc string, f func(el int32, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileUint

func (s SliceInt32) ReduceWhileUint(acc uint, f func(el int32, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileUint16

func (s SliceInt32) ReduceWhileUint16(acc uint16, f func(el int32, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileUint32

func (s SliceInt32) ReduceWhileUint32(acc uint32, f func(el int32, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileUint64

func (s SliceInt32) ReduceWhileUint64(acc uint64, f func(el int32, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) ReduceWhileUint8

func (s SliceInt32) ReduceWhileUint8(acc uint8, f func(el int32, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt32) Reverse

func (s SliceInt32) Reverse() []int32

Reverse returns given arr in reversed order

func (SliceInt32) Same

func (s SliceInt32) Same() bool

Same returns true if all element in arr the same

func (SliceInt32) ScanBool

func (s SliceInt32) ScanBool(acc bool, f func(el int32, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanByte

func (s SliceInt32) ScanByte(acc byte, f func(el int32, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanError

func (s SliceInt32) ScanError(acc error, f func(el int32, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanFloat32

func (s SliceInt32) ScanFloat32(acc float32, f func(el int32, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanFloat64

func (s SliceInt32) ScanFloat64(acc float64, f func(el int32, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanInt

func (s SliceInt32) ScanInt(acc int, f func(el int32, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanInt16

func (s SliceInt32) ScanInt16(acc int16, f func(el int32, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanInt32

func (s SliceInt32) ScanInt32(acc int32, f func(el int32, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanInt64

func (s SliceInt32) ScanInt64(acc int64, f func(el int32, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanInt8

func (s SliceInt32) ScanInt8(acc int8, f func(el int32, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanInterface

func (s SliceInt32) ScanInterface(acc interface{}, f func(el int32, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanRune

func (s SliceInt32) ScanRune(acc rune, f func(el int32, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanString

func (s SliceInt32) ScanString(acc string, f func(el int32, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanUint

func (s SliceInt32) ScanUint(acc uint, f func(el int32, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanUint16

func (s SliceInt32) ScanUint16(acc uint16, f func(el int32, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanUint32

func (s SliceInt32) ScanUint32(acc uint32, f func(el int32, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanUint64

func (s SliceInt32) ScanUint64(acc uint64, f func(el int32, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceInt32) ScanUint8

func (s SliceInt32) ScanUint8(acc uint8, f func(el int32, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceInt32) Shuffle

func (s SliceInt32) Shuffle(seed int64) []int32

Shuffle in random order arr elements

func (SliceInt32) Sort

func (s SliceInt32) Sort() []int32

Sort returns sorted slice

func (SliceInt32) Sorted

func (s SliceInt32) Sorted() bool

Sorted returns true if slice is sorted

func (SliceInt32) Split

func (s SliceInt32) Split(sep int32) [][]int32

Split splits arr by sep

func (SliceInt32) StartsWith

func (s SliceInt32) StartsWith(prefix []int32) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceInt32) Sum

func (s SliceInt32) Sum() int32

Sum return sum of all elements from arr

func (SliceInt32) TakeEvery

func (s SliceInt32) TakeEvery(nth int, from int) ([]int32, error)

TakeEvery returns slice of every nth elements

func (SliceInt32) TakeRandom

func (s SliceInt32) TakeRandom(count int, seed int64) ([]int32, error)

TakeRandom returns slice of count random elements from the slice

func (SliceInt32) TakeWhile

func (s SliceInt32) TakeWhile(f func(el int32) bool) []int32

TakeWhile takes elements from arr while f returns true

func (SliceInt32) ToChannel

func (s SliceInt32) ToChannel() chan int32

ToChannel returns channel with elements from the slice

func (SliceInt32) Uniq

func (s SliceInt32) Uniq() []int32

Uniq returns arr with only first occurences of every element.

func (SliceInt32) Window

func (s SliceInt32) Window(size int) ([][]int32, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceInt32) Without

func (s SliceInt32) Without(elements ...int32) []int32

Without returns the slice with filtered out element

type SliceInt64

type SliceInt64 struct {
	Data []int64
}

Slice is a set of operations to work with slice

func (SliceInt64) All

func (s SliceInt64) All(f func(el int64) bool) bool

All returns true if f returns true for all elements in arr

func (SliceInt64) Any

func (s SliceInt64) Any(f func(el int64) bool) bool

Any returns true if f returns true for any element in arr

func (SliceInt64) Choice

func (s SliceInt64) Choice(seed int64) (int64, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceInt64) ChunkByBool

func (s SliceInt64) ChunkByBool(f func(el int64) bool) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByByte

func (s SliceInt64) ChunkByByte(f func(el int64) byte) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByError

func (s SliceInt64) ChunkByError(f func(el int64) error) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByFloat32

func (s SliceInt64) ChunkByFloat32(f func(el int64) float32) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByFloat64

func (s SliceInt64) ChunkByFloat64(f func(el int64) float64) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByInt

func (s SliceInt64) ChunkByInt(f func(el int64) int) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByInt16

func (s SliceInt64) ChunkByInt16(f func(el int64) int16) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByInt32

func (s SliceInt64) ChunkByInt32(f func(el int64) int32) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByInt64

func (s SliceInt64) ChunkByInt64(f func(el int64) int64) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByInt8

func (s SliceInt64) ChunkByInt8(f func(el int64) int8) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByInterface

func (s SliceInt64) ChunkByInterface(f func(el int64) interface{}) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByRune

func (s SliceInt64) ChunkByRune(f func(el int64) rune) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByString

func (s SliceInt64) ChunkByString(f func(el int64) string) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByUint

func (s SliceInt64) ChunkByUint(f func(el int64) uint) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByUint16

func (s SliceInt64) ChunkByUint16(f func(el int64) uint16) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByUint32

func (s SliceInt64) ChunkByUint32(f func(el int64) uint32) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByUint64

func (s SliceInt64) ChunkByUint64(f func(el int64) uint64) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkByUint8

func (s SliceInt64) ChunkByUint8(f func(el int64) uint8) [][]int64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt64) ChunkEvery

func (s SliceInt64) ChunkEvery(count int) ([][]int64, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceInt64) Contains

func (s SliceInt64) Contains(el int64) bool

Contains returns true if el in arr.

func (SliceInt64) Count

func (s SliceInt64) Count(el int64) int

Count return count of el occurences in arr.

func (SliceInt64) CountBy

func (s SliceInt64) CountBy(f func(el int64) bool) int

CountBy returns how many times f returns true.

func (SliceInt64) Cycle

func (s SliceInt64) Cycle() chan int64

Cycle is an infinite loop over slice

func (SliceInt64) Dedup

func (s SliceInt64) Dedup() []int64

Dedup returns a given slice without consecutive duplicated elements

func (SliceInt64) DedupByBool

func (s SliceInt64) DedupByBool(f func(el int64) bool) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByByte

func (s SliceInt64) DedupByByte(f func(el int64) byte) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByError

func (s SliceInt64) DedupByError(f func(el int64) error) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByFloat32

func (s SliceInt64) DedupByFloat32(f func(el int64) float32) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByFloat64

func (s SliceInt64) DedupByFloat64(f func(el int64) float64) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByInt

func (s SliceInt64) DedupByInt(f func(el int64) int) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByInt16

func (s SliceInt64) DedupByInt16(f func(el int64) int16) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByInt32

func (s SliceInt64) DedupByInt32(f func(el int64) int32) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByInt64

func (s SliceInt64) DedupByInt64(f func(el int64) int64) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByInt8

func (s SliceInt64) DedupByInt8(f func(el int64) int8) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByInterface

func (s SliceInt64) DedupByInterface(f func(el int64) interface{}) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByRune

func (s SliceInt64) DedupByRune(f func(el int64) rune) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByString

func (s SliceInt64) DedupByString(f func(el int64) string) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByUint

func (s SliceInt64) DedupByUint(f func(el int64) uint) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByUint16

func (s SliceInt64) DedupByUint16(f func(el int64) uint16) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByUint32

func (s SliceInt64) DedupByUint32(f func(el int64) uint32) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByUint64

func (s SliceInt64) DedupByUint64(f func(el int64) uint64) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) DedupByUint8

func (s SliceInt64) DedupByUint8(f func(el int64) uint8) []int64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt64) Delete

func (s SliceInt64) Delete(element int64) []int64

Delete deletes the first occurence of the element from the slice

func (SliceInt64) DeleteAll

func (s SliceInt64) DeleteAll(element int64) []int64

DeleteAll deletes all occurences of the element from the slice

func (SliceInt64) DeleteAt

func (s SliceInt64) DeleteAt(indices ...int) ([]int64, error)

DeleteAt returns the slice without elements on given positions

func (SliceInt64) DropEvery

func (s SliceInt64) DropEvery(nth int, from int) ([]int64, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceInt64) DropWhile

func (s SliceInt64) DropWhile(f func(el int64) bool) []int64

DropWhile drops elements from arr while f returns true

func (SliceInt64) Each

func (s SliceInt64) Each(f func(el int64))

Each calls f for every element from arr

func (SliceInt64) EndsWith

func (s SliceInt64) EndsWith(suffix []int64) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceInt64) Equal

func (s SliceInt64) Equal(other []int64) bool

Equal returns true if slices are equal

func (SliceInt64) Filter

func (s SliceInt64) Filter(f func(el int64) bool) []int64

Filter returns slice of T for which F returned true

func (SliceInt64) Find

func (s SliceInt64) Find(f func(el int64) bool) (int64, error)

Find returns the first element for which f returns true

func (SliceInt64) FindIndex

func (s SliceInt64) FindIndex(f func(el int64) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceInt64) GroupByBool

func (s SliceInt64) GroupByBool(f func(el int64) bool) map[bool][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByByte

func (s SliceInt64) GroupByByte(f func(el int64) byte) map[byte][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByError

func (s SliceInt64) GroupByError(f func(el int64) error) map[error][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByFloat32

func (s SliceInt64) GroupByFloat32(f func(el int64) float32) map[float32][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByFloat64

func (s SliceInt64) GroupByFloat64(f func(el int64) float64) map[float64][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByInt

func (s SliceInt64) GroupByInt(f func(el int64) int) map[int][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByInt16

func (s SliceInt64) GroupByInt16(f func(el int64) int16) map[int16][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByInt32

func (s SliceInt64) GroupByInt32(f func(el int64) int32) map[int32][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByInt64

func (s SliceInt64) GroupByInt64(f func(el int64) int64) map[int64][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByInt8

func (s SliceInt64) GroupByInt8(f func(el int64) int8) map[int8][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByInterface

func (s SliceInt64) GroupByInterface(f func(el int64) interface{}) map[interface{}][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByRune

func (s SliceInt64) GroupByRune(f func(el int64) rune) map[rune][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByString

func (s SliceInt64) GroupByString(f func(el int64) string) map[string][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByUint

func (s SliceInt64) GroupByUint(f func(el int64) uint) map[uint][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByUint16

func (s SliceInt64) GroupByUint16(f func(el int64) uint16) map[uint16][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByUint32

func (s SliceInt64) GroupByUint32(f func(el int64) uint32) map[uint32][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByUint64

func (s SliceInt64) GroupByUint64(f func(el int64) uint64) map[uint64][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) GroupByUint8

func (s SliceInt64) GroupByUint8(f func(el int64) uint8) map[uint8][]int64

GroupBy groups element from array by value returned by f

func (SliceInt64) InsertAt

func (s SliceInt64) InsertAt(index int, element int64) ([]int64, error)

InsertAt returns the slice with element inserted at given index.

func (SliceInt64) Intersperse

func (s SliceInt64) Intersperse(el int64) []int64

Intersperse inserts el between each element of arr

func (SliceInt64) Join

func (s SliceInt64) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceInt64) Last

func (s SliceInt64) Last() (int64, error)

Last returns the last element from the slice

func (SliceInt64) MapBool

func (s SliceInt64) MapBool(f func(el int64) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapByte

func (s SliceInt64) MapByte(f func(el int64) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapError

func (s SliceInt64) MapError(f func(el int64) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapFloat32

func (s SliceInt64) MapFloat32(f func(el int64) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapFloat64

func (s SliceInt64) MapFloat64(f func(el int64) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapInt

func (s SliceInt64) MapInt(f func(el int64) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapInt16

func (s SliceInt64) MapInt16(f func(el int64) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapInt32

func (s SliceInt64) MapInt32(f func(el int64) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapInt64

func (s SliceInt64) MapInt64(f func(el int64) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapInt8

func (s SliceInt64) MapInt8(f func(el int64) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapInterface

func (s SliceInt64) MapInterface(f func(el int64) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapRune

func (s SliceInt64) MapRune(f func(el int64) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapString

func (s SliceInt64) MapString(f func(el int64) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapUint

func (s SliceInt64) MapUint(f func(el int64) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapUint16

func (s SliceInt64) MapUint16(f func(el int64) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapUint32

func (s SliceInt64) MapUint32(f func(el int64) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapUint64

func (s SliceInt64) MapUint64(f func(el int64) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) MapUint8

func (s SliceInt64) MapUint8(f func(el int64) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt64) Max

func (s SliceInt64) Max() (int64, error)

Max returns the maximal element from arr

func (SliceInt64) Min

func (s SliceInt64) Min() (int64, error)

Min returns the minimal element from arr

func (SliceInt64) Permutations

func (s SliceInt64) Permutations(size int) chan []int64

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceInt64) Product

func (s SliceInt64) Product(repeat int) chan []int64

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceInt64) ReduceBool

func (s SliceInt64) ReduceBool(acc bool, f func(el int64, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceByte

func (s SliceInt64) ReduceByte(acc byte, f func(el int64, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceError

func (s SliceInt64) ReduceError(acc error, f func(el int64, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceFloat32

func (s SliceInt64) ReduceFloat32(acc float32, f func(el int64, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceFloat64

func (s SliceInt64) ReduceFloat64(acc float64, f func(el int64, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceInt

func (s SliceInt64) ReduceInt(acc int, f func(el int64, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceInt16

func (s SliceInt64) ReduceInt16(acc int16, f func(el int64, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceInt32

func (s SliceInt64) ReduceInt32(acc int32, f func(el int64, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceInt64

func (s SliceInt64) ReduceInt64(acc int64, f func(el int64, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceInt8

func (s SliceInt64) ReduceInt8(acc int8, f func(el int64, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceInterface

func (s SliceInt64) ReduceInterface(acc interface{}, f func(el int64, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceRune

func (s SliceInt64) ReduceRune(acc rune, f func(el int64, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceString

func (s SliceInt64) ReduceString(acc string, f func(el int64, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceUint

func (s SliceInt64) ReduceUint(acc uint, f func(el int64, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceUint16

func (s SliceInt64) ReduceUint16(acc uint16, f func(el int64, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceUint32

func (s SliceInt64) ReduceUint32(acc uint32, f func(el int64, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceUint64

func (s SliceInt64) ReduceUint64(acc uint64, f func(el int64, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceUint8

func (s SliceInt64) ReduceUint8(acc uint8, f func(el int64, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt64) ReduceWhileBool

func (s SliceInt64) ReduceWhileBool(acc bool, f func(el int64, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileByte

func (s SliceInt64) ReduceWhileByte(acc byte, f func(el int64, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileError

func (s SliceInt64) ReduceWhileError(acc error, f func(el int64, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileFloat32

func (s SliceInt64) ReduceWhileFloat32(acc float32, f func(el int64, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileFloat64

func (s SliceInt64) ReduceWhileFloat64(acc float64, f func(el int64, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileInt

func (s SliceInt64) ReduceWhileInt(acc int, f func(el int64, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileInt16

func (s SliceInt64) ReduceWhileInt16(acc int16, f func(el int64, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileInt32

func (s SliceInt64) ReduceWhileInt32(acc int32, f func(el int64, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileInt64

func (s SliceInt64) ReduceWhileInt64(acc int64, f func(el int64, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileInt8

func (s SliceInt64) ReduceWhileInt8(acc int8, f func(el int64, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileInterface

func (s SliceInt64) ReduceWhileInterface(acc interface{}, f func(el int64, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileRune

func (s SliceInt64) ReduceWhileRune(acc rune, f func(el int64, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileString

func (s SliceInt64) ReduceWhileString(acc string, f func(el int64, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileUint

func (s SliceInt64) ReduceWhileUint(acc uint, f func(el int64, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileUint16

func (s SliceInt64) ReduceWhileUint16(acc uint16, f func(el int64, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileUint32

func (s SliceInt64) ReduceWhileUint32(acc uint32, f func(el int64, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileUint64

func (s SliceInt64) ReduceWhileUint64(acc uint64, f func(el int64, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) ReduceWhileUint8

func (s SliceInt64) ReduceWhileUint8(acc uint8, f func(el int64, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt64) Reverse

func (s SliceInt64) Reverse() []int64

Reverse returns given arr in reversed order

func (SliceInt64) Same

func (s SliceInt64) Same() bool

Same returns true if all element in arr the same

func (SliceInt64) ScanBool

func (s SliceInt64) ScanBool(acc bool, f func(el int64, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanByte

func (s SliceInt64) ScanByte(acc byte, f func(el int64, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanError

func (s SliceInt64) ScanError(acc error, f func(el int64, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanFloat32

func (s SliceInt64) ScanFloat32(acc float32, f func(el int64, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanFloat64

func (s SliceInt64) ScanFloat64(acc float64, f func(el int64, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanInt

func (s SliceInt64) ScanInt(acc int, f func(el int64, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanInt16

func (s SliceInt64) ScanInt16(acc int16, f func(el int64, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanInt32

func (s SliceInt64) ScanInt32(acc int32, f func(el int64, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanInt64

func (s SliceInt64) ScanInt64(acc int64, f func(el int64, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanInt8

func (s SliceInt64) ScanInt8(acc int8, f func(el int64, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanInterface

func (s SliceInt64) ScanInterface(acc interface{}, f func(el int64, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanRune

func (s SliceInt64) ScanRune(acc rune, f func(el int64, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanString

func (s SliceInt64) ScanString(acc string, f func(el int64, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanUint

func (s SliceInt64) ScanUint(acc uint, f func(el int64, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanUint16

func (s SliceInt64) ScanUint16(acc uint16, f func(el int64, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanUint32

func (s SliceInt64) ScanUint32(acc uint32, f func(el int64, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanUint64

func (s SliceInt64) ScanUint64(acc uint64, f func(el int64, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceInt64) ScanUint8

func (s SliceInt64) ScanUint8(acc uint8, f func(el int64, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceInt64) Shuffle

func (s SliceInt64) Shuffle(seed int64) []int64

Shuffle in random order arr elements

func (SliceInt64) Sort

func (s SliceInt64) Sort() []int64

Sort returns sorted slice

func (SliceInt64) Sorted

func (s SliceInt64) Sorted() bool

Sorted returns true if slice is sorted

func (SliceInt64) Split

func (s SliceInt64) Split(sep int64) [][]int64

Split splits arr by sep

func (SliceInt64) StartsWith

func (s SliceInt64) StartsWith(prefix []int64) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceInt64) Sum

func (s SliceInt64) Sum() int64

Sum return sum of all elements from arr

func (SliceInt64) TakeEvery

func (s SliceInt64) TakeEvery(nth int, from int) ([]int64, error)

TakeEvery returns slice of every nth elements

func (SliceInt64) TakeRandom

func (s SliceInt64) TakeRandom(count int, seed int64) ([]int64, error)

TakeRandom returns slice of count random elements from the slice

func (SliceInt64) TakeWhile

func (s SliceInt64) TakeWhile(f func(el int64) bool) []int64

TakeWhile takes elements from arr while f returns true

func (SliceInt64) ToChannel

func (s SliceInt64) ToChannel() chan int64

ToChannel returns channel with elements from the slice

func (SliceInt64) Uniq

func (s SliceInt64) Uniq() []int64

Uniq returns arr with only first occurences of every element.

func (SliceInt64) Window

func (s SliceInt64) Window(size int) ([][]int64, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceInt64) Without

func (s SliceInt64) Without(elements ...int64) []int64

Without returns the slice with filtered out element

type SliceInt8

type SliceInt8 struct {
	Data []int8
}

Slice is a set of operations to work with slice

func (SliceInt8) All

func (s SliceInt8) All(f func(el int8) bool) bool

All returns true if f returns true for all elements in arr

func (SliceInt8) Any

func (s SliceInt8) Any(f func(el int8) bool) bool

Any returns true if f returns true for any element in arr

func (SliceInt8) Choice

func (s SliceInt8) Choice(seed int64) (int8, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceInt8) ChunkByBool

func (s SliceInt8) ChunkByBool(f func(el int8) bool) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByByte

func (s SliceInt8) ChunkByByte(f func(el int8) byte) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByError

func (s SliceInt8) ChunkByError(f func(el int8) error) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByFloat32

func (s SliceInt8) ChunkByFloat32(f func(el int8) float32) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByFloat64

func (s SliceInt8) ChunkByFloat64(f func(el int8) float64) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByInt

func (s SliceInt8) ChunkByInt(f func(el int8) int) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByInt16

func (s SliceInt8) ChunkByInt16(f func(el int8) int16) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByInt32

func (s SliceInt8) ChunkByInt32(f func(el int8) int32) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByInt64

func (s SliceInt8) ChunkByInt64(f func(el int8) int64) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByInt8

func (s SliceInt8) ChunkByInt8(f func(el int8) int8) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByInterface

func (s SliceInt8) ChunkByInterface(f func(el int8) interface{}) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByRune

func (s SliceInt8) ChunkByRune(f func(el int8) rune) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByString

func (s SliceInt8) ChunkByString(f func(el int8) string) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByUint

func (s SliceInt8) ChunkByUint(f func(el int8) uint) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByUint16

func (s SliceInt8) ChunkByUint16(f func(el int8) uint16) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByUint32

func (s SliceInt8) ChunkByUint32(f func(el int8) uint32) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByUint64

func (s SliceInt8) ChunkByUint64(f func(el int8) uint64) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkByUint8

func (s SliceInt8) ChunkByUint8(f func(el int8) uint8) [][]int8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInt8) ChunkEvery

func (s SliceInt8) ChunkEvery(count int) ([][]int8, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceInt8) Contains

func (s SliceInt8) Contains(el int8) bool

Contains returns true if el in arr.

func (SliceInt8) Count

func (s SliceInt8) Count(el int8) int

Count return count of el occurences in arr.

func (SliceInt8) CountBy

func (s SliceInt8) CountBy(f func(el int8) bool) int

CountBy returns how many times f returns true.

func (SliceInt8) Cycle

func (s SliceInt8) Cycle() chan int8

Cycle is an infinite loop over slice

func (SliceInt8) Dedup

func (s SliceInt8) Dedup() []int8

Dedup returns a given slice without consecutive duplicated elements

func (SliceInt8) DedupByBool

func (s SliceInt8) DedupByBool(f func(el int8) bool) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByByte

func (s SliceInt8) DedupByByte(f func(el int8) byte) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByError

func (s SliceInt8) DedupByError(f func(el int8) error) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByFloat32

func (s SliceInt8) DedupByFloat32(f func(el int8) float32) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByFloat64

func (s SliceInt8) DedupByFloat64(f func(el int8) float64) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByInt

func (s SliceInt8) DedupByInt(f func(el int8) int) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByInt16

func (s SliceInt8) DedupByInt16(f func(el int8) int16) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByInt32

func (s SliceInt8) DedupByInt32(f func(el int8) int32) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByInt64

func (s SliceInt8) DedupByInt64(f func(el int8) int64) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByInt8

func (s SliceInt8) DedupByInt8(f func(el int8) int8) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByInterface

func (s SliceInt8) DedupByInterface(f func(el int8) interface{}) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByRune

func (s SliceInt8) DedupByRune(f func(el int8) rune) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByString

func (s SliceInt8) DedupByString(f func(el int8) string) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByUint

func (s SliceInt8) DedupByUint(f func(el int8) uint) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByUint16

func (s SliceInt8) DedupByUint16(f func(el int8) uint16) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByUint32

func (s SliceInt8) DedupByUint32(f func(el int8) uint32) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByUint64

func (s SliceInt8) DedupByUint64(f func(el int8) uint64) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) DedupByUint8

func (s SliceInt8) DedupByUint8(f func(el int8) uint8) []int8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInt8) Delete

func (s SliceInt8) Delete(element int8) []int8

Delete deletes the first occurence of the element from the slice

func (SliceInt8) DeleteAll

func (s SliceInt8) DeleteAll(element int8) []int8

DeleteAll deletes all occurences of the element from the slice

func (SliceInt8) DeleteAt

func (s SliceInt8) DeleteAt(indices ...int) ([]int8, error)

DeleteAt returns the slice without elements on given positions

func (SliceInt8) DropEvery

func (s SliceInt8) DropEvery(nth int, from int) ([]int8, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceInt8) DropWhile

func (s SliceInt8) DropWhile(f func(el int8) bool) []int8

DropWhile drops elements from arr while f returns true

func (SliceInt8) Each

func (s SliceInt8) Each(f func(el int8))

Each calls f for every element from arr

func (SliceInt8) EndsWith

func (s SliceInt8) EndsWith(suffix []int8) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceInt8) Equal

func (s SliceInt8) Equal(other []int8) bool

Equal returns true if slices are equal

func (SliceInt8) Filter

func (s SliceInt8) Filter(f func(el int8) bool) []int8

Filter returns slice of T for which F returned true

func (SliceInt8) Find

func (s SliceInt8) Find(f func(el int8) bool) (int8, error)

Find returns the first element for which f returns true

func (SliceInt8) FindIndex

func (s SliceInt8) FindIndex(f func(el int8) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceInt8) GroupByBool

func (s SliceInt8) GroupByBool(f func(el int8) bool) map[bool][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByByte

func (s SliceInt8) GroupByByte(f func(el int8) byte) map[byte][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByError

func (s SliceInt8) GroupByError(f func(el int8) error) map[error][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByFloat32

func (s SliceInt8) GroupByFloat32(f func(el int8) float32) map[float32][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByFloat64

func (s SliceInt8) GroupByFloat64(f func(el int8) float64) map[float64][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByInt

func (s SliceInt8) GroupByInt(f func(el int8) int) map[int][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByInt16

func (s SliceInt8) GroupByInt16(f func(el int8) int16) map[int16][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByInt32

func (s SliceInt8) GroupByInt32(f func(el int8) int32) map[int32][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByInt64

func (s SliceInt8) GroupByInt64(f func(el int8) int64) map[int64][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByInt8

func (s SliceInt8) GroupByInt8(f func(el int8) int8) map[int8][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByInterface

func (s SliceInt8) GroupByInterface(f func(el int8) interface{}) map[interface{}][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByRune

func (s SliceInt8) GroupByRune(f func(el int8) rune) map[rune][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByString

func (s SliceInt8) GroupByString(f func(el int8) string) map[string][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByUint

func (s SliceInt8) GroupByUint(f func(el int8) uint) map[uint][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByUint16

func (s SliceInt8) GroupByUint16(f func(el int8) uint16) map[uint16][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByUint32

func (s SliceInt8) GroupByUint32(f func(el int8) uint32) map[uint32][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByUint64

func (s SliceInt8) GroupByUint64(f func(el int8) uint64) map[uint64][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) GroupByUint8

func (s SliceInt8) GroupByUint8(f func(el int8) uint8) map[uint8][]int8

GroupBy groups element from array by value returned by f

func (SliceInt8) InsertAt

func (s SliceInt8) InsertAt(index int, element int8) ([]int8, error)

InsertAt returns the slice with element inserted at given index.

func (SliceInt8) Intersperse

func (s SliceInt8) Intersperse(el int8) []int8

Intersperse inserts el between each element of arr

func (SliceInt8) Join

func (s SliceInt8) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceInt8) Last

func (s SliceInt8) Last() (int8, error)

Last returns the last element from the slice

func (SliceInt8) MapBool

func (s SliceInt8) MapBool(f func(el int8) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapByte

func (s SliceInt8) MapByte(f func(el int8) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapError

func (s SliceInt8) MapError(f func(el int8) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapFloat32

func (s SliceInt8) MapFloat32(f func(el int8) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapFloat64

func (s SliceInt8) MapFloat64(f func(el int8) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapInt

func (s SliceInt8) MapInt(f func(el int8) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapInt16

func (s SliceInt8) MapInt16(f func(el int8) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapInt32

func (s SliceInt8) MapInt32(f func(el int8) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapInt64

func (s SliceInt8) MapInt64(f func(el int8) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapInt8

func (s SliceInt8) MapInt8(f func(el int8) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapInterface

func (s SliceInt8) MapInterface(f func(el int8) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapRune

func (s SliceInt8) MapRune(f func(el int8) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapString

func (s SliceInt8) MapString(f func(el int8) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapUint

func (s SliceInt8) MapUint(f func(el int8) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapUint16

func (s SliceInt8) MapUint16(f func(el int8) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapUint32

func (s SliceInt8) MapUint32(f func(el int8) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapUint64

func (s SliceInt8) MapUint64(f func(el int8) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) MapUint8

func (s SliceInt8) MapUint8(f func(el int8) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInt8) Max

func (s SliceInt8) Max() (int8, error)

Max returns the maximal element from arr

func (SliceInt8) Min

func (s SliceInt8) Min() (int8, error)

Min returns the minimal element from arr

func (SliceInt8) Permutations

func (s SliceInt8) Permutations(size int) chan []int8

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceInt8) Product

func (s SliceInt8) Product(repeat int) chan []int8

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceInt8) ReduceBool

func (s SliceInt8) ReduceBool(acc bool, f func(el int8, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceByte

func (s SliceInt8) ReduceByte(acc byte, f func(el int8, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceError

func (s SliceInt8) ReduceError(acc error, f func(el int8, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceFloat32

func (s SliceInt8) ReduceFloat32(acc float32, f func(el int8, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceFloat64

func (s SliceInt8) ReduceFloat64(acc float64, f func(el int8, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceInt

func (s SliceInt8) ReduceInt(acc int, f func(el int8, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceInt16

func (s SliceInt8) ReduceInt16(acc int16, f func(el int8, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceInt32

func (s SliceInt8) ReduceInt32(acc int32, f func(el int8, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceInt64

func (s SliceInt8) ReduceInt64(acc int64, f func(el int8, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceInt8

func (s SliceInt8) ReduceInt8(acc int8, f func(el int8, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceInterface

func (s SliceInt8) ReduceInterface(acc interface{}, f func(el int8, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceRune

func (s SliceInt8) ReduceRune(acc rune, f func(el int8, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceString

func (s SliceInt8) ReduceString(acc string, f func(el int8, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceUint

func (s SliceInt8) ReduceUint(acc uint, f func(el int8, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceUint16

func (s SliceInt8) ReduceUint16(acc uint16, f func(el int8, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceUint32

func (s SliceInt8) ReduceUint32(acc uint32, f func(el int8, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceUint64

func (s SliceInt8) ReduceUint64(acc uint64, f func(el int8, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceUint8

func (s SliceInt8) ReduceUint8(acc uint8, f func(el int8, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInt8) ReduceWhileBool

func (s SliceInt8) ReduceWhileBool(acc bool, f func(el int8, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileByte

func (s SliceInt8) ReduceWhileByte(acc byte, f func(el int8, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileError

func (s SliceInt8) ReduceWhileError(acc error, f func(el int8, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileFloat32

func (s SliceInt8) ReduceWhileFloat32(acc float32, f func(el int8, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileFloat64

func (s SliceInt8) ReduceWhileFloat64(acc float64, f func(el int8, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileInt

func (s SliceInt8) ReduceWhileInt(acc int, f func(el int8, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileInt16

func (s SliceInt8) ReduceWhileInt16(acc int16, f func(el int8, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileInt32

func (s SliceInt8) ReduceWhileInt32(acc int32, f func(el int8, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileInt64

func (s SliceInt8) ReduceWhileInt64(acc int64, f func(el int8, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileInt8

func (s SliceInt8) ReduceWhileInt8(acc int8, f func(el int8, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileInterface

func (s SliceInt8) ReduceWhileInterface(acc interface{}, f func(el int8, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileRune

func (s SliceInt8) ReduceWhileRune(acc rune, f func(el int8, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileString

func (s SliceInt8) ReduceWhileString(acc string, f func(el int8, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileUint

func (s SliceInt8) ReduceWhileUint(acc uint, f func(el int8, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileUint16

func (s SliceInt8) ReduceWhileUint16(acc uint16, f func(el int8, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileUint32

func (s SliceInt8) ReduceWhileUint32(acc uint32, f func(el int8, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileUint64

func (s SliceInt8) ReduceWhileUint64(acc uint64, f func(el int8, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) ReduceWhileUint8

func (s SliceInt8) ReduceWhileUint8(acc uint8, f func(el int8, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInt8) Reverse

func (s SliceInt8) Reverse() []int8

Reverse returns given arr in reversed order

func (SliceInt8) Same

func (s SliceInt8) Same() bool

Same returns true if all element in arr the same

func (SliceInt8) ScanBool

func (s SliceInt8) ScanBool(acc bool, f func(el int8, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanByte

func (s SliceInt8) ScanByte(acc byte, f func(el int8, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanError

func (s SliceInt8) ScanError(acc error, f func(el int8, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanFloat32

func (s SliceInt8) ScanFloat32(acc float32, f func(el int8, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanFloat64

func (s SliceInt8) ScanFloat64(acc float64, f func(el int8, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanInt

func (s SliceInt8) ScanInt(acc int, f func(el int8, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanInt16

func (s SliceInt8) ScanInt16(acc int16, f func(el int8, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanInt32

func (s SliceInt8) ScanInt32(acc int32, f func(el int8, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanInt64

func (s SliceInt8) ScanInt64(acc int64, f func(el int8, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanInt8

func (s SliceInt8) ScanInt8(acc int8, f func(el int8, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanInterface

func (s SliceInt8) ScanInterface(acc interface{}, f func(el int8, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanRune

func (s SliceInt8) ScanRune(acc rune, f func(el int8, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanString

func (s SliceInt8) ScanString(acc string, f func(el int8, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanUint

func (s SliceInt8) ScanUint(acc uint, f func(el int8, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanUint16

func (s SliceInt8) ScanUint16(acc uint16, f func(el int8, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanUint32

func (s SliceInt8) ScanUint32(acc uint32, f func(el int8, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanUint64

func (s SliceInt8) ScanUint64(acc uint64, f func(el int8, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceInt8) ScanUint8

func (s SliceInt8) ScanUint8(acc uint8, f func(el int8, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceInt8) Shuffle

func (s SliceInt8) Shuffle(seed int64) []int8

Shuffle in random order arr elements

func (SliceInt8) Sort

func (s SliceInt8) Sort() []int8

Sort returns sorted slice

func (SliceInt8) Sorted

func (s SliceInt8) Sorted() bool

Sorted returns true if slice is sorted

func (SliceInt8) Split

func (s SliceInt8) Split(sep int8) [][]int8

Split splits arr by sep

func (SliceInt8) StartsWith

func (s SliceInt8) StartsWith(prefix []int8) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceInt8) Sum

func (s SliceInt8) Sum() int8

Sum return sum of all elements from arr

func (SliceInt8) TakeEvery

func (s SliceInt8) TakeEvery(nth int, from int) ([]int8, error)

TakeEvery returns slice of every nth elements

func (SliceInt8) TakeRandom

func (s SliceInt8) TakeRandom(count int, seed int64) ([]int8, error)

TakeRandom returns slice of count random elements from the slice

func (SliceInt8) TakeWhile

func (s SliceInt8) TakeWhile(f func(el int8) bool) []int8

TakeWhile takes elements from arr while f returns true

func (SliceInt8) ToChannel

func (s SliceInt8) ToChannel() chan int8

ToChannel returns channel with elements from the slice

func (SliceInt8) Uniq

func (s SliceInt8) Uniq() []int8

Uniq returns arr with only first occurences of every element.

func (SliceInt8) Window

func (s SliceInt8) Window(size int) ([][]int8, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceInt8) Without

func (s SliceInt8) Without(elements ...int8) []int8

Without returns the slice with filtered out element

type SliceInterface

type SliceInterface struct {
	Data []interface{}
}

Slice is a set of operations to work with slice

func (SliceInterface) All

func (s SliceInterface) All(f func(el interface{}) bool) bool

All returns true if f returns true for all elements in arr

func (SliceInterface) Any

func (s SliceInterface) Any(f func(el interface{}) bool) bool

Any returns true if f returns true for any element in arr

func (SliceInterface) Choice

func (s SliceInterface) Choice(seed int64) (interface{}, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceInterface) ChunkByBool

func (s SliceInterface) ChunkByBool(f func(el interface{}) bool) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByByte

func (s SliceInterface) ChunkByByte(f func(el interface{}) byte) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByError

func (s SliceInterface) ChunkByError(f func(el interface{}) error) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByFloat32

func (s SliceInterface) ChunkByFloat32(f func(el interface{}) float32) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByFloat64

func (s SliceInterface) ChunkByFloat64(f func(el interface{}) float64) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByInt

func (s SliceInterface) ChunkByInt(f func(el interface{}) int) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByInt16

func (s SliceInterface) ChunkByInt16(f func(el interface{}) int16) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByInt32

func (s SliceInterface) ChunkByInt32(f func(el interface{}) int32) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByInt64

func (s SliceInterface) ChunkByInt64(f func(el interface{}) int64) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByInt8

func (s SliceInterface) ChunkByInt8(f func(el interface{}) int8) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByInterface

func (s SliceInterface) ChunkByInterface(f func(el interface{}) interface{}) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByRune

func (s SliceInterface) ChunkByRune(f func(el interface{}) rune) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByString

func (s SliceInterface) ChunkByString(f func(el interface{}) string) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByUint

func (s SliceInterface) ChunkByUint(f func(el interface{}) uint) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByUint16

func (s SliceInterface) ChunkByUint16(f func(el interface{}) uint16) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByUint32

func (s SliceInterface) ChunkByUint32(f func(el interface{}) uint32) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByUint64

func (s SliceInterface) ChunkByUint64(f func(el interface{}) uint64) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkByUint8

func (s SliceInterface) ChunkByUint8(f func(el interface{}) uint8) [][]interface{}

ChunkBy splits arr on every element for which f returns a new value.

func (SliceInterface) ChunkEvery

func (s SliceInterface) ChunkEvery(count int) ([][]interface{}, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceInterface) Contains

func (s SliceInterface) Contains(el interface{}) bool

Contains returns true if el in arr.

func (SliceInterface) Count

func (s SliceInterface) Count(el interface{}) int

Count return count of el occurences in arr.

func (SliceInterface) CountBy

func (s SliceInterface) CountBy(f func(el interface{}) bool) int

CountBy returns how many times f returns true.

func (SliceInterface) Cycle

func (s SliceInterface) Cycle() chan interface{}

Cycle is an infinite loop over slice

func (SliceInterface) Dedup

func (s SliceInterface) Dedup() []interface{}

Dedup returns a given slice without consecutive duplicated elements

func (SliceInterface) DedupByBool

func (s SliceInterface) DedupByBool(f func(el interface{}) bool) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByByte

func (s SliceInterface) DedupByByte(f func(el interface{}) byte) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByError

func (s SliceInterface) DedupByError(f func(el interface{}) error) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByFloat32

func (s SliceInterface) DedupByFloat32(f func(el interface{}) float32) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByFloat64

func (s SliceInterface) DedupByFloat64(f func(el interface{}) float64) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByInt

func (s SliceInterface) DedupByInt(f func(el interface{}) int) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByInt16

func (s SliceInterface) DedupByInt16(f func(el interface{}) int16) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByInt32

func (s SliceInterface) DedupByInt32(f func(el interface{}) int32) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByInt64

func (s SliceInterface) DedupByInt64(f func(el interface{}) int64) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByInt8

func (s SliceInterface) DedupByInt8(f func(el interface{}) int8) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByInterface

func (s SliceInterface) DedupByInterface(f func(el interface{}) interface{}) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByRune

func (s SliceInterface) DedupByRune(f func(el interface{}) rune) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByString

func (s SliceInterface) DedupByString(f func(el interface{}) string) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByUint

func (s SliceInterface) DedupByUint(f func(el interface{}) uint) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByUint16

func (s SliceInterface) DedupByUint16(f func(el interface{}) uint16) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByUint32

func (s SliceInterface) DedupByUint32(f func(el interface{}) uint32) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByUint64

func (s SliceInterface) DedupByUint64(f func(el interface{}) uint64) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) DedupByUint8

func (s SliceInterface) DedupByUint8(f func(el interface{}) uint8) []interface{}

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceInterface) Delete

func (s SliceInterface) Delete(element interface{}) []interface{}

Delete deletes the first occurence of the element from the slice

func (SliceInterface) DeleteAll

func (s SliceInterface) DeleteAll(element interface{}) []interface{}

DeleteAll deletes all occurences of the element from the slice

func (SliceInterface) DeleteAt

func (s SliceInterface) DeleteAt(indices ...int) ([]interface{}, error)

DeleteAt returns the slice without elements on given positions

func (SliceInterface) DropEvery

func (s SliceInterface) DropEvery(nth int, from int) ([]interface{}, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceInterface) DropWhile

func (s SliceInterface) DropWhile(f func(el interface{}) bool) []interface{}

DropWhile drops elements from arr while f returns true

func (SliceInterface) Each

func (s SliceInterface) Each(f func(el interface{}))

Each calls f for every element from arr

func (SliceInterface) EndsWith

func (s SliceInterface) EndsWith(suffix []interface{}) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceInterface) Equal

func (s SliceInterface) Equal(other []interface{}) bool

Equal returns true if slices are equal

func (SliceInterface) Filter

func (s SliceInterface) Filter(f func(el interface{}) bool) []interface{}

Filter returns slice of T for which F returned true

func (SliceInterface) Find

func (s SliceInterface) Find(f func(el interface{}) bool) (interface{}, error)

Find returns the first element for which f returns true

func (SliceInterface) FindIndex

func (s SliceInterface) FindIndex(f func(el interface{}) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceInterface) GroupByBool

func (s SliceInterface) GroupByBool(f func(el interface{}) bool) map[bool][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByByte

func (s SliceInterface) GroupByByte(f func(el interface{}) byte) map[byte][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByError

func (s SliceInterface) GroupByError(f func(el interface{}) error) map[error][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByFloat32

func (s SliceInterface) GroupByFloat32(f func(el interface{}) float32) map[float32][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByFloat64

func (s SliceInterface) GroupByFloat64(f func(el interface{}) float64) map[float64][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByInt

func (s SliceInterface) GroupByInt(f func(el interface{}) int) map[int][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByInt16

func (s SliceInterface) GroupByInt16(f func(el interface{}) int16) map[int16][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByInt32

func (s SliceInterface) GroupByInt32(f func(el interface{}) int32) map[int32][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByInt64

func (s SliceInterface) GroupByInt64(f func(el interface{}) int64) map[int64][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByInt8

func (s SliceInterface) GroupByInt8(f func(el interface{}) int8) map[int8][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByInterface

func (s SliceInterface) GroupByInterface(f func(el interface{}) interface{}) map[interface{}][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByRune

func (s SliceInterface) GroupByRune(f func(el interface{}) rune) map[rune][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByString

func (s SliceInterface) GroupByString(f func(el interface{}) string) map[string][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByUint

func (s SliceInterface) GroupByUint(f func(el interface{}) uint) map[uint][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByUint16

func (s SliceInterface) GroupByUint16(f func(el interface{}) uint16) map[uint16][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByUint32

func (s SliceInterface) GroupByUint32(f func(el interface{}) uint32) map[uint32][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByUint64

func (s SliceInterface) GroupByUint64(f func(el interface{}) uint64) map[uint64][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) GroupByUint8

func (s SliceInterface) GroupByUint8(f func(el interface{}) uint8) map[uint8][]interface{}

GroupBy groups element from array by value returned by f

func (SliceInterface) InsertAt

func (s SliceInterface) InsertAt(index int, element interface{}) ([]interface{}, error)

InsertAt returns the slice with element inserted at given index.

func (SliceInterface) Intersperse

func (s SliceInterface) Intersperse(el interface{}) []interface{}

Intersperse inserts el between each element of arr

func (SliceInterface) Last

func (s SliceInterface) Last() (interface{}, error)

Last returns the last element from the slice

func (SliceInterface) MapBool

func (s SliceInterface) MapBool(f func(el interface{}) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapByte

func (s SliceInterface) MapByte(f func(el interface{}) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapError

func (s SliceInterface) MapError(f func(el interface{}) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapFloat32

func (s SliceInterface) MapFloat32(f func(el interface{}) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapFloat64

func (s SliceInterface) MapFloat64(f func(el interface{}) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapInt

func (s SliceInterface) MapInt(f func(el interface{}) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapInt16

func (s SliceInterface) MapInt16(f func(el interface{}) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapInt32

func (s SliceInterface) MapInt32(f func(el interface{}) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapInt64

func (s SliceInterface) MapInt64(f func(el interface{}) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapInt8

func (s SliceInterface) MapInt8(f func(el interface{}) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapInterface

func (s SliceInterface) MapInterface(f func(el interface{}) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapRune

func (s SliceInterface) MapRune(f func(el interface{}) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapString

func (s SliceInterface) MapString(f func(el interface{}) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapUint

func (s SliceInterface) MapUint(f func(el interface{}) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapUint16

func (s SliceInterface) MapUint16(f func(el interface{}) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapUint32

func (s SliceInterface) MapUint32(f func(el interface{}) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapUint64

func (s SliceInterface) MapUint64(f func(el interface{}) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) MapUint8

func (s SliceInterface) MapUint8(f func(el interface{}) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceInterface) Permutations

func (s SliceInterface) Permutations(size int) chan []interface{}

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceInterface) Product

func (s SliceInterface) Product(repeat int) chan []interface{}

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceInterface) ReduceBool

func (s SliceInterface) ReduceBool(acc bool, f func(el interface{}, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceByte

func (s SliceInterface) ReduceByte(acc byte, f func(el interface{}, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceError

func (s SliceInterface) ReduceError(acc error, f func(el interface{}, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceFloat32

func (s SliceInterface) ReduceFloat32(acc float32, f func(el interface{}, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceFloat64

func (s SliceInterface) ReduceFloat64(acc float64, f func(el interface{}, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceInt

func (s SliceInterface) ReduceInt(acc int, f func(el interface{}, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceInt16

func (s SliceInterface) ReduceInt16(acc int16, f func(el interface{}, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceInt32

func (s SliceInterface) ReduceInt32(acc int32, f func(el interface{}, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceInt64

func (s SliceInterface) ReduceInt64(acc int64, f func(el interface{}, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceInt8

func (s SliceInterface) ReduceInt8(acc int8, f func(el interface{}, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceInterface

func (s SliceInterface) ReduceInterface(acc interface{}, f func(el interface{}, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceRune

func (s SliceInterface) ReduceRune(acc rune, f func(el interface{}, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceString

func (s SliceInterface) ReduceString(acc string, f func(el interface{}, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceUint

func (s SliceInterface) ReduceUint(acc uint, f func(el interface{}, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceUint16

func (s SliceInterface) ReduceUint16(acc uint16, f func(el interface{}, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceUint32

func (s SliceInterface) ReduceUint32(acc uint32, f func(el interface{}, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceUint64

func (s SliceInterface) ReduceUint64(acc uint64, f func(el interface{}, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceUint8

func (s SliceInterface) ReduceUint8(acc uint8, f func(el interface{}, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceInterface) ReduceWhileBool

func (s SliceInterface) ReduceWhileBool(acc bool, f func(el interface{}, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileByte

func (s SliceInterface) ReduceWhileByte(acc byte, f func(el interface{}, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileError

func (s SliceInterface) ReduceWhileError(acc error, f func(el interface{}, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileFloat32

func (s SliceInterface) ReduceWhileFloat32(acc float32, f func(el interface{}, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileFloat64

func (s SliceInterface) ReduceWhileFloat64(acc float64, f func(el interface{}, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileInt

func (s SliceInterface) ReduceWhileInt(acc int, f func(el interface{}, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileInt16

func (s SliceInterface) ReduceWhileInt16(acc int16, f func(el interface{}, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileInt32

func (s SliceInterface) ReduceWhileInt32(acc int32, f func(el interface{}, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileInt64

func (s SliceInterface) ReduceWhileInt64(acc int64, f func(el interface{}, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileInt8

func (s SliceInterface) ReduceWhileInt8(acc int8, f func(el interface{}, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileInterface

func (s SliceInterface) ReduceWhileInterface(acc interface{}, f func(el interface{}, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileRune

func (s SliceInterface) ReduceWhileRune(acc rune, f func(el interface{}, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileString

func (s SliceInterface) ReduceWhileString(acc string, f func(el interface{}, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileUint

func (s SliceInterface) ReduceWhileUint(acc uint, f func(el interface{}, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileUint16

func (s SliceInterface) ReduceWhileUint16(acc uint16, f func(el interface{}, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileUint32

func (s SliceInterface) ReduceWhileUint32(acc uint32, f func(el interface{}, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileUint64

func (s SliceInterface) ReduceWhileUint64(acc uint64, f func(el interface{}, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) ReduceWhileUint8

func (s SliceInterface) ReduceWhileUint8(acc uint8, f func(el interface{}, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceInterface) Reverse

func (s SliceInterface) Reverse() []interface{}

Reverse returns given arr in reversed order

func (SliceInterface) Same

func (s SliceInterface) Same() bool

Same returns true if all element in arr the same

func (SliceInterface) ScanBool

func (s SliceInterface) ScanBool(acc bool, f func(el interface{}, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanByte

func (s SliceInterface) ScanByte(acc byte, f func(el interface{}, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanError

func (s SliceInterface) ScanError(acc error, f func(el interface{}, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanFloat32

func (s SliceInterface) ScanFloat32(acc float32, f func(el interface{}, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanFloat64

func (s SliceInterface) ScanFloat64(acc float64, f func(el interface{}, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanInt

func (s SliceInterface) ScanInt(acc int, f func(el interface{}, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanInt16

func (s SliceInterface) ScanInt16(acc int16, f func(el interface{}, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanInt32

func (s SliceInterface) ScanInt32(acc int32, f func(el interface{}, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanInt64

func (s SliceInterface) ScanInt64(acc int64, f func(el interface{}, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanInt8

func (s SliceInterface) ScanInt8(acc int8, f func(el interface{}, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanInterface

func (s SliceInterface) ScanInterface(acc interface{}, f func(el interface{}, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanRune

func (s SliceInterface) ScanRune(acc rune, f func(el interface{}, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanString

func (s SliceInterface) ScanString(acc string, f func(el interface{}, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanUint

func (s SliceInterface) ScanUint(acc uint, f func(el interface{}, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanUint16

func (s SliceInterface) ScanUint16(acc uint16, f func(el interface{}, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanUint32

func (s SliceInterface) ScanUint32(acc uint32, f func(el interface{}, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanUint64

func (s SliceInterface) ScanUint64(acc uint64, f func(el interface{}, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceInterface) ScanUint8

func (s SliceInterface) ScanUint8(acc uint8, f func(el interface{}, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceInterface) Shuffle

func (s SliceInterface) Shuffle(seed int64) []interface{}

Shuffle in random order arr elements

func (SliceInterface) Split

func (s SliceInterface) Split(sep interface{}) [][]interface{}

Split splits arr by sep

func (SliceInterface) StartsWith

func (s SliceInterface) StartsWith(prefix []interface{}) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceInterface) TakeEvery

func (s SliceInterface) TakeEvery(nth int, from int) ([]interface{}, error)

TakeEvery returns slice of every nth elements

func (SliceInterface) TakeRandom

func (s SliceInterface) TakeRandom(count int, seed int64) ([]interface{}, error)

TakeRandom returns slice of count random elements from the slice

func (SliceInterface) TakeWhile

func (s SliceInterface) TakeWhile(f func(el interface{}) bool) []interface{}

TakeWhile takes elements from arr while f returns true

func (SliceInterface) ToChannel

func (s SliceInterface) ToChannel() chan interface{}

ToChannel returns channel with elements from the slice

func (SliceInterface) Uniq

func (s SliceInterface) Uniq() []interface{}

Uniq returns arr with only first occurences of every element.

func (SliceInterface) Window

func (s SliceInterface) Window(size int) ([][]interface{}, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceInterface) Without

func (s SliceInterface) Without(elements ...interface{}) []interface{}

Without returns the slice with filtered out element

type SliceRune

type SliceRune struct {
	Data []rune
}

Slice is a set of operations to work with slice

func (SliceRune) All

func (s SliceRune) All(f func(el rune) bool) bool

All returns true if f returns true for all elements in arr

func (SliceRune) Any

func (s SliceRune) Any(f func(el rune) bool) bool

Any returns true if f returns true for any element in arr

func (SliceRune) Choice

func (s SliceRune) Choice(seed int64) (rune, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceRune) ChunkByBool

func (s SliceRune) ChunkByBool(f func(el rune) bool) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByByte

func (s SliceRune) ChunkByByte(f func(el rune) byte) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByError

func (s SliceRune) ChunkByError(f func(el rune) error) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByFloat32

func (s SliceRune) ChunkByFloat32(f func(el rune) float32) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByFloat64

func (s SliceRune) ChunkByFloat64(f func(el rune) float64) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByInt

func (s SliceRune) ChunkByInt(f func(el rune) int) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByInt16

func (s SliceRune) ChunkByInt16(f func(el rune) int16) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByInt32

func (s SliceRune) ChunkByInt32(f func(el rune) int32) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByInt64

func (s SliceRune) ChunkByInt64(f func(el rune) int64) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByInt8

func (s SliceRune) ChunkByInt8(f func(el rune) int8) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByInterface

func (s SliceRune) ChunkByInterface(f func(el rune) interface{}) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByRune

func (s SliceRune) ChunkByRune(f func(el rune) rune) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByString

func (s SliceRune) ChunkByString(f func(el rune) string) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByUint

func (s SliceRune) ChunkByUint(f func(el rune) uint) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByUint16

func (s SliceRune) ChunkByUint16(f func(el rune) uint16) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByUint32

func (s SliceRune) ChunkByUint32(f func(el rune) uint32) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByUint64

func (s SliceRune) ChunkByUint64(f func(el rune) uint64) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkByUint8

func (s SliceRune) ChunkByUint8(f func(el rune) uint8) [][]rune

ChunkBy splits arr on every element for which f returns a new value.

func (SliceRune) ChunkEvery

func (s SliceRune) ChunkEvery(count int) ([][]rune, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceRune) Contains

func (s SliceRune) Contains(el rune) bool

Contains returns true if el in arr.

func (SliceRune) Count

func (s SliceRune) Count(el rune) int

Count return count of el occurences in arr.

func (SliceRune) CountBy

func (s SliceRune) CountBy(f func(el rune) bool) int

CountBy returns how many times f returns true.

func (SliceRune) Cycle

func (s SliceRune) Cycle() chan rune

Cycle is an infinite loop over slice

func (SliceRune) Dedup

func (s SliceRune) Dedup() []rune

Dedup returns a given slice without consecutive duplicated elements

func (SliceRune) DedupByBool

func (s SliceRune) DedupByBool(f func(el rune) bool) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByByte

func (s SliceRune) DedupByByte(f func(el rune) byte) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByError

func (s SliceRune) DedupByError(f func(el rune) error) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByFloat32

func (s SliceRune) DedupByFloat32(f func(el rune) float32) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByFloat64

func (s SliceRune) DedupByFloat64(f func(el rune) float64) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByInt

func (s SliceRune) DedupByInt(f func(el rune) int) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByInt16

func (s SliceRune) DedupByInt16(f func(el rune) int16) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByInt32

func (s SliceRune) DedupByInt32(f func(el rune) int32) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByInt64

func (s SliceRune) DedupByInt64(f func(el rune) int64) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByInt8

func (s SliceRune) DedupByInt8(f func(el rune) int8) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByInterface

func (s SliceRune) DedupByInterface(f func(el rune) interface{}) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByRune

func (s SliceRune) DedupByRune(f func(el rune) rune) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByString

func (s SliceRune) DedupByString(f func(el rune) string) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByUint

func (s SliceRune) DedupByUint(f func(el rune) uint) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByUint16

func (s SliceRune) DedupByUint16(f func(el rune) uint16) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByUint32

func (s SliceRune) DedupByUint32(f func(el rune) uint32) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByUint64

func (s SliceRune) DedupByUint64(f func(el rune) uint64) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) DedupByUint8

func (s SliceRune) DedupByUint8(f func(el rune) uint8) []rune

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceRune) Delete

func (s SliceRune) Delete(element rune) []rune

Delete deletes the first occurence of the element from the slice

func (SliceRune) DeleteAll

func (s SliceRune) DeleteAll(element rune) []rune

DeleteAll deletes all occurences of the element from the slice

func (SliceRune) DeleteAt

func (s SliceRune) DeleteAt(indices ...int) ([]rune, error)

DeleteAt returns the slice without elements on given positions

func (SliceRune) DropEvery

func (s SliceRune) DropEvery(nth int, from int) ([]rune, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceRune) DropWhile

func (s SliceRune) DropWhile(f func(el rune) bool) []rune

DropWhile drops elements from arr while f returns true

func (SliceRune) Each

func (s SliceRune) Each(f func(el rune))

Each calls f for every element from arr

func (SliceRune) EndsWith

func (s SliceRune) EndsWith(suffix []rune) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceRune) Equal

func (s SliceRune) Equal(other []rune) bool

Equal returns true if slices are equal

func (SliceRune) Filter

func (s SliceRune) Filter(f func(el rune) bool) []rune

Filter returns slice of T for which F returned true

func (SliceRune) Find

func (s SliceRune) Find(f func(el rune) bool) (rune, error)

Find returns the first element for which f returns true

func (SliceRune) FindIndex

func (s SliceRune) FindIndex(f func(el rune) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceRune) GroupByBool

func (s SliceRune) GroupByBool(f func(el rune) bool) map[bool][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByByte

func (s SliceRune) GroupByByte(f func(el rune) byte) map[byte][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByError

func (s SliceRune) GroupByError(f func(el rune) error) map[error][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByFloat32

func (s SliceRune) GroupByFloat32(f func(el rune) float32) map[float32][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByFloat64

func (s SliceRune) GroupByFloat64(f func(el rune) float64) map[float64][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByInt

func (s SliceRune) GroupByInt(f func(el rune) int) map[int][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByInt16

func (s SliceRune) GroupByInt16(f func(el rune) int16) map[int16][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByInt32

func (s SliceRune) GroupByInt32(f func(el rune) int32) map[int32][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByInt64

func (s SliceRune) GroupByInt64(f func(el rune) int64) map[int64][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByInt8

func (s SliceRune) GroupByInt8(f func(el rune) int8) map[int8][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByInterface

func (s SliceRune) GroupByInterface(f func(el rune) interface{}) map[interface{}][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByRune

func (s SliceRune) GroupByRune(f func(el rune) rune) map[rune][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByString

func (s SliceRune) GroupByString(f func(el rune) string) map[string][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByUint

func (s SliceRune) GroupByUint(f func(el rune) uint) map[uint][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByUint16

func (s SliceRune) GroupByUint16(f func(el rune) uint16) map[uint16][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByUint32

func (s SliceRune) GroupByUint32(f func(el rune) uint32) map[uint32][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByUint64

func (s SliceRune) GroupByUint64(f func(el rune) uint64) map[uint64][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) GroupByUint8

func (s SliceRune) GroupByUint8(f func(el rune) uint8) map[uint8][]rune

GroupBy groups element from array by value returned by f

func (SliceRune) InsertAt

func (s SliceRune) InsertAt(index int, element rune) ([]rune, error)

InsertAt returns the slice with element inserted at given index.

func (SliceRune) Intersperse

func (s SliceRune) Intersperse(el rune) []rune

Intersperse inserts el between each element of arr

func (SliceRune) Join

func (s SliceRune) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceRune) Last

func (s SliceRune) Last() (rune, error)

Last returns the last element from the slice

func (SliceRune) MapBool

func (s SliceRune) MapBool(f func(el rune) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapByte

func (s SliceRune) MapByte(f func(el rune) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapError

func (s SliceRune) MapError(f func(el rune) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapFloat32

func (s SliceRune) MapFloat32(f func(el rune) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapFloat64

func (s SliceRune) MapFloat64(f func(el rune) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapInt

func (s SliceRune) MapInt(f func(el rune) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapInt16

func (s SliceRune) MapInt16(f func(el rune) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapInt32

func (s SliceRune) MapInt32(f func(el rune) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapInt64

func (s SliceRune) MapInt64(f func(el rune) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapInt8

func (s SliceRune) MapInt8(f func(el rune) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapInterface

func (s SliceRune) MapInterface(f func(el rune) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapRune

func (s SliceRune) MapRune(f func(el rune) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapString

func (s SliceRune) MapString(f func(el rune) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapUint

func (s SliceRune) MapUint(f func(el rune) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapUint16

func (s SliceRune) MapUint16(f func(el rune) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapUint32

func (s SliceRune) MapUint32(f func(el rune) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapUint64

func (s SliceRune) MapUint64(f func(el rune) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) MapUint8

func (s SliceRune) MapUint8(f func(el rune) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceRune) Max

func (s SliceRune) Max() (rune, error)

Max returns the maximal element from arr

func (SliceRune) Min

func (s SliceRune) Min() (rune, error)

Min returns the minimal element from arr

func (SliceRune) Permutations

func (s SliceRune) Permutations(size int) chan []rune

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceRune) Product

func (s SliceRune) Product(repeat int) chan []rune

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceRune) ReduceBool

func (s SliceRune) ReduceBool(acc bool, f func(el rune, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceByte

func (s SliceRune) ReduceByte(acc byte, f func(el rune, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceError

func (s SliceRune) ReduceError(acc error, f func(el rune, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceFloat32

func (s SliceRune) ReduceFloat32(acc float32, f func(el rune, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceFloat64

func (s SliceRune) ReduceFloat64(acc float64, f func(el rune, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceInt

func (s SliceRune) ReduceInt(acc int, f func(el rune, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceInt16

func (s SliceRune) ReduceInt16(acc int16, f func(el rune, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceInt32

func (s SliceRune) ReduceInt32(acc int32, f func(el rune, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceInt64

func (s SliceRune) ReduceInt64(acc int64, f func(el rune, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceInt8

func (s SliceRune) ReduceInt8(acc int8, f func(el rune, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceInterface

func (s SliceRune) ReduceInterface(acc interface{}, f func(el rune, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceRune

func (s SliceRune) ReduceRune(acc rune, f func(el rune, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceString

func (s SliceRune) ReduceString(acc string, f func(el rune, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceUint

func (s SliceRune) ReduceUint(acc uint, f func(el rune, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceUint16

func (s SliceRune) ReduceUint16(acc uint16, f func(el rune, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceUint32

func (s SliceRune) ReduceUint32(acc uint32, f func(el rune, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceUint64

func (s SliceRune) ReduceUint64(acc uint64, f func(el rune, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceUint8

func (s SliceRune) ReduceUint8(acc uint8, f func(el rune, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceRune) ReduceWhileBool

func (s SliceRune) ReduceWhileBool(acc bool, f func(el rune, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileByte

func (s SliceRune) ReduceWhileByte(acc byte, f func(el rune, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileError

func (s SliceRune) ReduceWhileError(acc error, f func(el rune, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileFloat32

func (s SliceRune) ReduceWhileFloat32(acc float32, f func(el rune, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileFloat64

func (s SliceRune) ReduceWhileFloat64(acc float64, f func(el rune, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileInt

func (s SliceRune) ReduceWhileInt(acc int, f func(el rune, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileInt16

func (s SliceRune) ReduceWhileInt16(acc int16, f func(el rune, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileInt32

func (s SliceRune) ReduceWhileInt32(acc int32, f func(el rune, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileInt64

func (s SliceRune) ReduceWhileInt64(acc int64, f func(el rune, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileInt8

func (s SliceRune) ReduceWhileInt8(acc int8, f func(el rune, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileInterface

func (s SliceRune) ReduceWhileInterface(acc interface{}, f func(el rune, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileRune

func (s SliceRune) ReduceWhileRune(acc rune, f func(el rune, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileString

func (s SliceRune) ReduceWhileString(acc string, f func(el rune, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileUint

func (s SliceRune) ReduceWhileUint(acc uint, f func(el rune, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileUint16

func (s SliceRune) ReduceWhileUint16(acc uint16, f func(el rune, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileUint32

func (s SliceRune) ReduceWhileUint32(acc uint32, f func(el rune, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileUint64

func (s SliceRune) ReduceWhileUint64(acc uint64, f func(el rune, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) ReduceWhileUint8

func (s SliceRune) ReduceWhileUint8(acc uint8, f func(el rune, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceRune) Reverse

func (s SliceRune) Reverse() []rune

Reverse returns given arr in reversed order

func (SliceRune) Same

func (s SliceRune) Same() bool

Same returns true if all element in arr the same

func (SliceRune) ScanBool

func (s SliceRune) ScanBool(acc bool, f func(el rune, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanByte

func (s SliceRune) ScanByte(acc byte, f func(el rune, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanError

func (s SliceRune) ScanError(acc error, f func(el rune, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanFloat32

func (s SliceRune) ScanFloat32(acc float32, f func(el rune, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanFloat64

func (s SliceRune) ScanFloat64(acc float64, f func(el rune, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanInt

func (s SliceRune) ScanInt(acc int, f func(el rune, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanInt16

func (s SliceRune) ScanInt16(acc int16, f func(el rune, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanInt32

func (s SliceRune) ScanInt32(acc int32, f func(el rune, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanInt64

func (s SliceRune) ScanInt64(acc int64, f func(el rune, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanInt8

func (s SliceRune) ScanInt8(acc int8, f func(el rune, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanInterface

func (s SliceRune) ScanInterface(acc interface{}, f func(el rune, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanRune

func (s SliceRune) ScanRune(acc rune, f func(el rune, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanString

func (s SliceRune) ScanString(acc string, f func(el rune, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanUint

func (s SliceRune) ScanUint(acc uint, f func(el rune, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanUint16

func (s SliceRune) ScanUint16(acc uint16, f func(el rune, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanUint32

func (s SliceRune) ScanUint32(acc uint32, f func(el rune, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanUint64

func (s SliceRune) ScanUint64(acc uint64, f func(el rune, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceRune) ScanUint8

func (s SliceRune) ScanUint8(acc uint8, f func(el rune, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceRune) Shuffle

func (s SliceRune) Shuffle(seed int64) []rune

Shuffle in random order arr elements

func (SliceRune) Sort

func (s SliceRune) Sort() []rune

Sort returns sorted slice

func (SliceRune) Sorted

func (s SliceRune) Sorted() bool

Sorted returns true if slice is sorted

func (SliceRune) Split

func (s SliceRune) Split(sep rune) [][]rune

Split splits arr by sep

func (SliceRune) StartsWith

func (s SliceRune) StartsWith(prefix []rune) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceRune) Sum

func (s SliceRune) Sum() rune

Sum return sum of all elements from arr

func (SliceRune) TakeEvery

func (s SliceRune) TakeEvery(nth int, from int) ([]rune, error)

TakeEvery returns slice of every nth elements

func (SliceRune) TakeRandom

func (s SliceRune) TakeRandom(count int, seed int64) ([]rune, error)

TakeRandom returns slice of count random elements from the slice

func (SliceRune) TakeWhile

func (s SliceRune) TakeWhile(f func(el rune) bool) []rune

TakeWhile takes elements from arr while f returns true

func (SliceRune) ToChannel

func (s SliceRune) ToChannel() chan rune

ToChannel returns channel with elements from the slice

func (SliceRune) Uniq

func (s SliceRune) Uniq() []rune

Uniq returns arr with only first occurences of every element.

func (SliceRune) Window

func (s SliceRune) Window(size int) ([][]rune, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceRune) Without

func (s SliceRune) Without(elements ...rune) []rune

Without returns the slice with filtered out element

type SliceString

type SliceString struct {
	Data []string
}

Slice is a set of operations to work with slice

func (SliceString) All

func (s SliceString) All(f func(el string) bool) bool

All returns true if f returns true for all elements in arr

func (SliceString) Any

func (s SliceString) Any(f func(el string) bool) bool

Any returns true if f returns true for any element in arr

func (SliceString) Choice

func (s SliceString) Choice(seed int64) (string, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceString) ChunkByBool

func (s SliceString) ChunkByBool(f func(el string) bool) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByByte

func (s SliceString) ChunkByByte(f func(el string) byte) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByError

func (s SliceString) ChunkByError(f func(el string) error) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByFloat32

func (s SliceString) ChunkByFloat32(f func(el string) float32) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByFloat64

func (s SliceString) ChunkByFloat64(f func(el string) float64) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByInt

func (s SliceString) ChunkByInt(f func(el string) int) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByInt16

func (s SliceString) ChunkByInt16(f func(el string) int16) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByInt32

func (s SliceString) ChunkByInt32(f func(el string) int32) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByInt64

func (s SliceString) ChunkByInt64(f func(el string) int64) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByInt8

func (s SliceString) ChunkByInt8(f func(el string) int8) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByInterface

func (s SliceString) ChunkByInterface(f func(el string) interface{}) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByRune

func (s SliceString) ChunkByRune(f func(el string) rune) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByString

func (s SliceString) ChunkByString(f func(el string) string) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByUint

func (s SliceString) ChunkByUint(f func(el string) uint) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByUint16

func (s SliceString) ChunkByUint16(f func(el string) uint16) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByUint32

func (s SliceString) ChunkByUint32(f func(el string) uint32) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByUint64

func (s SliceString) ChunkByUint64(f func(el string) uint64) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkByUint8

func (s SliceString) ChunkByUint8(f func(el string) uint8) [][]string

ChunkBy splits arr on every element for which f returns a new value.

func (SliceString) ChunkEvery

func (s SliceString) ChunkEvery(count int) ([][]string, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceString) Contains

func (s SliceString) Contains(el string) bool

Contains returns true if el in arr.

func (SliceString) Count

func (s SliceString) Count(el string) int

Count return count of el occurences in arr.

func (SliceString) CountBy

func (s SliceString) CountBy(f func(el string) bool) int

CountBy returns how many times f returns true.

func (SliceString) Cycle

func (s SliceString) Cycle() chan string

Cycle is an infinite loop over slice

func (SliceString) Dedup

func (s SliceString) Dedup() []string

Dedup returns a given slice without consecutive duplicated elements

func (SliceString) DedupByBool

func (s SliceString) DedupByBool(f func(el string) bool) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByByte

func (s SliceString) DedupByByte(f func(el string) byte) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByError

func (s SliceString) DedupByError(f func(el string) error) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByFloat32

func (s SliceString) DedupByFloat32(f func(el string) float32) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByFloat64

func (s SliceString) DedupByFloat64(f func(el string) float64) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByInt

func (s SliceString) DedupByInt(f func(el string) int) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByInt16

func (s SliceString) DedupByInt16(f func(el string) int16) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByInt32

func (s SliceString) DedupByInt32(f func(el string) int32) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByInt64

func (s SliceString) DedupByInt64(f func(el string) int64) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByInt8

func (s SliceString) DedupByInt8(f func(el string) int8) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByInterface

func (s SliceString) DedupByInterface(f func(el string) interface{}) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByRune

func (s SliceString) DedupByRune(f func(el string) rune) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByString

func (s SliceString) DedupByString(f func(el string) string) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByUint

func (s SliceString) DedupByUint(f func(el string) uint) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByUint16

func (s SliceString) DedupByUint16(f func(el string) uint16) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByUint32

func (s SliceString) DedupByUint32(f func(el string) uint32) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByUint64

func (s SliceString) DedupByUint64(f func(el string) uint64) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) DedupByUint8

func (s SliceString) DedupByUint8(f func(el string) uint8) []string

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceString) Delete

func (s SliceString) Delete(element string) []string

Delete deletes the first occurence of the element from the slice

func (SliceString) DeleteAll

func (s SliceString) DeleteAll(element string) []string

DeleteAll deletes all occurences of the element from the slice

func (SliceString) DeleteAt

func (s SliceString) DeleteAt(indices ...int) ([]string, error)

DeleteAt returns the slice without elements on given positions

func (SliceString) DropEvery

func (s SliceString) DropEvery(nth int, from int) ([]string, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceString) DropWhile

func (s SliceString) DropWhile(f func(el string) bool) []string

DropWhile drops elements from arr while f returns true

func (SliceString) Each

func (s SliceString) Each(f func(el string))

Each calls f for every element from arr

func (SliceString) EndsWith

func (s SliceString) EndsWith(suffix []string) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceString) Equal

func (s SliceString) Equal(other []string) bool

Equal returns true if slices are equal

func (SliceString) Filter

func (s SliceString) Filter(f func(el string) bool) []string

Filter returns slice of T for which F returned true

func (SliceString) Find

func (s SliceString) Find(f func(el string) bool) (string, error)

Find returns the first element for which f returns true

func (SliceString) FindIndex

func (s SliceString) FindIndex(f func(el string) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceString) GroupByBool

func (s SliceString) GroupByBool(f func(el string) bool) map[bool][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByByte

func (s SliceString) GroupByByte(f func(el string) byte) map[byte][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByError

func (s SliceString) GroupByError(f func(el string) error) map[error][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByFloat32

func (s SliceString) GroupByFloat32(f func(el string) float32) map[float32][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByFloat64

func (s SliceString) GroupByFloat64(f func(el string) float64) map[float64][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByInt

func (s SliceString) GroupByInt(f func(el string) int) map[int][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByInt16

func (s SliceString) GroupByInt16(f func(el string) int16) map[int16][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByInt32

func (s SliceString) GroupByInt32(f func(el string) int32) map[int32][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByInt64

func (s SliceString) GroupByInt64(f func(el string) int64) map[int64][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByInt8

func (s SliceString) GroupByInt8(f func(el string) int8) map[int8][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByInterface

func (s SliceString) GroupByInterface(f func(el string) interface{}) map[interface{}][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByRune

func (s SliceString) GroupByRune(f func(el string) rune) map[rune][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByString

func (s SliceString) GroupByString(f func(el string) string) map[string][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByUint

func (s SliceString) GroupByUint(f func(el string) uint) map[uint][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByUint16

func (s SliceString) GroupByUint16(f func(el string) uint16) map[uint16][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByUint32

func (s SliceString) GroupByUint32(f func(el string) uint32) map[uint32][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByUint64

func (s SliceString) GroupByUint64(f func(el string) uint64) map[uint64][]string

GroupBy groups element from array by value returned by f

func (SliceString) GroupByUint8

func (s SliceString) GroupByUint8(f func(el string) uint8) map[uint8][]string

GroupBy groups element from array by value returned by f

func (SliceString) InsertAt

func (s SliceString) InsertAt(index int, element string) ([]string, error)

InsertAt returns the slice with element inserted at given index.

func (SliceString) Intersperse

func (s SliceString) Intersperse(el string) []string

Intersperse inserts el between each element of arr

func (SliceString) Join

func (s SliceString) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceString) Last

func (s SliceString) Last() (string, error)

Last returns the last element from the slice

func (SliceString) MapBool

func (s SliceString) MapBool(f func(el string) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapByte

func (s SliceString) MapByte(f func(el string) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapError

func (s SliceString) MapError(f func(el string) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapFloat32

func (s SliceString) MapFloat32(f func(el string) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapFloat64

func (s SliceString) MapFloat64(f func(el string) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapInt

func (s SliceString) MapInt(f func(el string) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapInt16

func (s SliceString) MapInt16(f func(el string) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapInt32

func (s SliceString) MapInt32(f func(el string) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapInt64

func (s SliceString) MapInt64(f func(el string) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapInt8

func (s SliceString) MapInt8(f func(el string) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapInterface

func (s SliceString) MapInterface(f func(el string) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapRune

func (s SliceString) MapRune(f func(el string) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapString

func (s SliceString) MapString(f func(el string) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapUint

func (s SliceString) MapUint(f func(el string) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapUint16

func (s SliceString) MapUint16(f func(el string) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapUint32

func (s SliceString) MapUint32(f func(el string) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapUint64

func (s SliceString) MapUint64(f func(el string) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) MapUint8

func (s SliceString) MapUint8(f func(el string) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceString) Max

func (s SliceString) Max() (string, error)

Max returns the maximal element from arr

func (SliceString) Min

func (s SliceString) Min() (string, error)

Min returns the minimal element from arr

func (SliceString) Permutations

func (s SliceString) Permutations(size int) chan []string

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceString) Product

func (s SliceString) Product(repeat int) chan []string

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceString) ReduceBool

func (s SliceString) ReduceBool(acc bool, f func(el string, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceByte

func (s SliceString) ReduceByte(acc byte, f func(el string, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceError

func (s SliceString) ReduceError(acc error, f func(el string, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceFloat32

func (s SliceString) ReduceFloat32(acc float32, f func(el string, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceFloat64

func (s SliceString) ReduceFloat64(acc float64, f func(el string, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceInt

func (s SliceString) ReduceInt(acc int, f func(el string, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceInt16

func (s SliceString) ReduceInt16(acc int16, f func(el string, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceInt32

func (s SliceString) ReduceInt32(acc int32, f func(el string, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceInt64

func (s SliceString) ReduceInt64(acc int64, f func(el string, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceInt8

func (s SliceString) ReduceInt8(acc int8, f func(el string, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceInterface

func (s SliceString) ReduceInterface(acc interface{}, f func(el string, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceRune

func (s SliceString) ReduceRune(acc rune, f func(el string, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceString

func (s SliceString) ReduceString(acc string, f func(el string, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceUint

func (s SliceString) ReduceUint(acc uint, f func(el string, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceUint16

func (s SliceString) ReduceUint16(acc uint16, f func(el string, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceUint32

func (s SliceString) ReduceUint32(acc uint32, f func(el string, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceUint64

func (s SliceString) ReduceUint64(acc uint64, f func(el string, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceUint8

func (s SliceString) ReduceUint8(acc uint8, f func(el string, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceString) ReduceWhileBool

func (s SliceString) ReduceWhileBool(acc bool, f func(el string, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileByte

func (s SliceString) ReduceWhileByte(acc byte, f func(el string, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileError

func (s SliceString) ReduceWhileError(acc error, f func(el string, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileFloat32

func (s SliceString) ReduceWhileFloat32(acc float32, f func(el string, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileFloat64

func (s SliceString) ReduceWhileFloat64(acc float64, f func(el string, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileInt

func (s SliceString) ReduceWhileInt(acc int, f func(el string, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileInt16

func (s SliceString) ReduceWhileInt16(acc int16, f func(el string, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileInt32

func (s SliceString) ReduceWhileInt32(acc int32, f func(el string, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileInt64

func (s SliceString) ReduceWhileInt64(acc int64, f func(el string, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileInt8

func (s SliceString) ReduceWhileInt8(acc int8, f func(el string, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileInterface

func (s SliceString) ReduceWhileInterface(acc interface{}, f func(el string, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileRune

func (s SliceString) ReduceWhileRune(acc rune, f func(el string, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileString

func (s SliceString) ReduceWhileString(acc string, f func(el string, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileUint

func (s SliceString) ReduceWhileUint(acc uint, f func(el string, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileUint16

func (s SliceString) ReduceWhileUint16(acc uint16, f func(el string, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileUint32

func (s SliceString) ReduceWhileUint32(acc uint32, f func(el string, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileUint64

func (s SliceString) ReduceWhileUint64(acc uint64, f func(el string, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) ReduceWhileUint8

func (s SliceString) ReduceWhileUint8(acc uint8, f func(el string, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceString) Reverse

func (s SliceString) Reverse() []string

Reverse returns given arr in reversed order

func (SliceString) Same

func (s SliceString) Same() bool

Same returns true if all element in arr the same

func (SliceString) ScanBool

func (s SliceString) ScanBool(acc bool, f func(el string, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanByte

func (s SliceString) ScanByte(acc byte, f func(el string, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanError

func (s SliceString) ScanError(acc error, f func(el string, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanFloat32

func (s SliceString) ScanFloat32(acc float32, f func(el string, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanFloat64

func (s SliceString) ScanFloat64(acc float64, f func(el string, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanInt

func (s SliceString) ScanInt(acc int, f func(el string, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanInt16

func (s SliceString) ScanInt16(acc int16, f func(el string, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanInt32

func (s SliceString) ScanInt32(acc int32, f func(el string, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanInt64

func (s SliceString) ScanInt64(acc int64, f func(el string, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanInt8

func (s SliceString) ScanInt8(acc int8, f func(el string, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanInterface

func (s SliceString) ScanInterface(acc interface{}, f func(el string, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanRune

func (s SliceString) ScanRune(acc rune, f func(el string, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanString

func (s SliceString) ScanString(acc string, f func(el string, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanUint

func (s SliceString) ScanUint(acc uint, f func(el string, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanUint16

func (s SliceString) ScanUint16(acc uint16, f func(el string, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanUint32

func (s SliceString) ScanUint32(acc uint32, f func(el string, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanUint64

func (s SliceString) ScanUint64(acc uint64, f func(el string, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceString) ScanUint8

func (s SliceString) ScanUint8(acc uint8, f func(el string, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceString) Shuffle

func (s SliceString) Shuffle(seed int64) []string

Shuffle in random order arr elements

func (SliceString) Sort

func (s SliceString) Sort() []string

Sort returns sorted slice

func (SliceString) Sorted

func (s SliceString) Sorted() bool

Sorted returns true if slice is sorted

func (SliceString) Split

func (s SliceString) Split(sep string) [][]string

Split splits arr by sep

func (SliceString) StartsWith

func (s SliceString) StartsWith(prefix []string) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceString) Sum

func (s SliceString) Sum() string

Sum return sum of all elements from arr

func (SliceString) TakeEvery

func (s SliceString) TakeEvery(nth int, from int) ([]string, error)

TakeEvery returns slice of every nth elements

func (SliceString) TakeRandom

func (s SliceString) TakeRandom(count int, seed int64) ([]string, error)

TakeRandom returns slice of count random elements from the slice

func (SliceString) TakeWhile

func (s SliceString) TakeWhile(f func(el string) bool) []string

TakeWhile takes elements from arr while f returns true

func (SliceString) ToChannel

func (s SliceString) ToChannel() chan string

ToChannel returns channel with elements from the slice

func (SliceString) Uniq

func (s SliceString) Uniq() []string

Uniq returns arr with only first occurences of every element.

func (SliceString) Window

func (s SliceString) Window(size int) ([][]string, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceString) Without

func (s SliceString) Without(elements ...string) []string

Without returns the slice with filtered out element

type SliceUint

type SliceUint struct {
	Data []uint
}

Slice is a set of operations to work with slice

func (SliceUint) All

func (s SliceUint) All(f func(el uint) bool) bool

All returns true if f returns true for all elements in arr

func (SliceUint) Any

func (s SliceUint) Any(f func(el uint) bool) bool

Any returns true if f returns true for any element in arr

func (SliceUint) Choice

func (s SliceUint) Choice(seed int64) (uint, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceUint) ChunkByBool

func (s SliceUint) ChunkByBool(f func(el uint) bool) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByByte

func (s SliceUint) ChunkByByte(f func(el uint) byte) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByError

func (s SliceUint) ChunkByError(f func(el uint) error) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByFloat32

func (s SliceUint) ChunkByFloat32(f func(el uint) float32) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByFloat64

func (s SliceUint) ChunkByFloat64(f func(el uint) float64) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByInt

func (s SliceUint) ChunkByInt(f func(el uint) int) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByInt16

func (s SliceUint) ChunkByInt16(f func(el uint) int16) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByInt32

func (s SliceUint) ChunkByInt32(f func(el uint) int32) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByInt64

func (s SliceUint) ChunkByInt64(f func(el uint) int64) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByInt8

func (s SliceUint) ChunkByInt8(f func(el uint) int8) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByInterface

func (s SliceUint) ChunkByInterface(f func(el uint) interface{}) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByRune

func (s SliceUint) ChunkByRune(f func(el uint) rune) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByString

func (s SliceUint) ChunkByString(f func(el uint) string) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByUint

func (s SliceUint) ChunkByUint(f func(el uint) uint) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByUint16

func (s SliceUint) ChunkByUint16(f func(el uint) uint16) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByUint32

func (s SliceUint) ChunkByUint32(f func(el uint) uint32) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByUint64

func (s SliceUint) ChunkByUint64(f func(el uint) uint64) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkByUint8

func (s SliceUint) ChunkByUint8(f func(el uint) uint8) [][]uint

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint) ChunkEvery

func (s SliceUint) ChunkEvery(count int) ([][]uint, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceUint) Contains

func (s SliceUint) Contains(el uint) bool

Contains returns true if el in arr.

func (SliceUint) Count

func (s SliceUint) Count(el uint) int

Count return count of el occurences in arr.

func (SliceUint) CountBy

func (s SliceUint) CountBy(f func(el uint) bool) int

CountBy returns how many times f returns true.

func (SliceUint) Cycle

func (s SliceUint) Cycle() chan uint

Cycle is an infinite loop over slice

func (SliceUint) Dedup

func (s SliceUint) Dedup() []uint

Dedup returns a given slice without consecutive duplicated elements

func (SliceUint) DedupByBool

func (s SliceUint) DedupByBool(f func(el uint) bool) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByByte

func (s SliceUint) DedupByByte(f func(el uint) byte) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByError

func (s SliceUint) DedupByError(f func(el uint) error) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByFloat32

func (s SliceUint) DedupByFloat32(f func(el uint) float32) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByFloat64

func (s SliceUint) DedupByFloat64(f func(el uint) float64) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByInt

func (s SliceUint) DedupByInt(f func(el uint) int) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByInt16

func (s SliceUint) DedupByInt16(f func(el uint) int16) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByInt32

func (s SliceUint) DedupByInt32(f func(el uint) int32) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByInt64

func (s SliceUint) DedupByInt64(f func(el uint) int64) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByInt8

func (s SliceUint) DedupByInt8(f func(el uint) int8) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByInterface

func (s SliceUint) DedupByInterface(f func(el uint) interface{}) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByRune

func (s SliceUint) DedupByRune(f func(el uint) rune) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByString

func (s SliceUint) DedupByString(f func(el uint) string) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByUint

func (s SliceUint) DedupByUint(f func(el uint) uint) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByUint16

func (s SliceUint) DedupByUint16(f func(el uint) uint16) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByUint32

func (s SliceUint) DedupByUint32(f func(el uint) uint32) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByUint64

func (s SliceUint) DedupByUint64(f func(el uint) uint64) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) DedupByUint8

func (s SliceUint) DedupByUint8(f func(el uint) uint8) []uint

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint) Delete

func (s SliceUint) Delete(element uint) []uint

Delete deletes the first occurence of the element from the slice

func (SliceUint) DeleteAll

func (s SliceUint) DeleteAll(element uint) []uint

DeleteAll deletes all occurences of the element from the slice

func (SliceUint) DeleteAt

func (s SliceUint) DeleteAt(indices ...int) ([]uint, error)

DeleteAt returns the slice without elements on given positions

func (SliceUint) DropEvery

func (s SliceUint) DropEvery(nth int, from int) ([]uint, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceUint) DropWhile

func (s SliceUint) DropWhile(f func(el uint) bool) []uint

DropWhile drops elements from arr while f returns true

func (SliceUint) Each

func (s SliceUint) Each(f func(el uint))

Each calls f for every element from arr

func (SliceUint) EndsWith

func (s SliceUint) EndsWith(suffix []uint) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceUint) Equal

func (s SliceUint) Equal(other []uint) bool

Equal returns true if slices are equal

func (SliceUint) Filter

func (s SliceUint) Filter(f func(el uint) bool) []uint

Filter returns slice of T for which F returned true

func (SliceUint) Find

func (s SliceUint) Find(f func(el uint) bool) (uint, error)

Find returns the first element for which f returns true

func (SliceUint) FindIndex

func (s SliceUint) FindIndex(f func(el uint) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceUint) GroupByBool

func (s SliceUint) GroupByBool(f func(el uint) bool) map[bool][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByByte

func (s SliceUint) GroupByByte(f func(el uint) byte) map[byte][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByError

func (s SliceUint) GroupByError(f func(el uint) error) map[error][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByFloat32

func (s SliceUint) GroupByFloat32(f func(el uint) float32) map[float32][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByFloat64

func (s SliceUint) GroupByFloat64(f func(el uint) float64) map[float64][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByInt

func (s SliceUint) GroupByInt(f func(el uint) int) map[int][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByInt16

func (s SliceUint) GroupByInt16(f func(el uint) int16) map[int16][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByInt32

func (s SliceUint) GroupByInt32(f func(el uint) int32) map[int32][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByInt64

func (s SliceUint) GroupByInt64(f func(el uint) int64) map[int64][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByInt8

func (s SliceUint) GroupByInt8(f func(el uint) int8) map[int8][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByInterface

func (s SliceUint) GroupByInterface(f func(el uint) interface{}) map[interface{}][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByRune

func (s SliceUint) GroupByRune(f func(el uint) rune) map[rune][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByString

func (s SliceUint) GroupByString(f func(el uint) string) map[string][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByUint

func (s SliceUint) GroupByUint(f func(el uint) uint) map[uint][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByUint16

func (s SliceUint) GroupByUint16(f func(el uint) uint16) map[uint16][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByUint32

func (s SliceUint) GroupByUint32(f func(el uint) uint32) map[uint32][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByUint64

func (s SliceUint) GroupByUint64(f func(el uint) uint64) map[uint64][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) GroupByUint8

func (s SliceUint) GroupByUint8(f func(el uint) uint8) map[uint8][]uint

GroupBy groups element from array by value returned by f

func (SliceUint) InsertAt

func (s SliceUint) InsertAt(index int, element uint) ([]uint, error)

InsertAt returns the slice with element inserted at given index.

func (SliceUint) Intersperse

func (s SliceUint) Intersperse(el uint) []uint

Intersperse inserts el between each element of arr

func (SliceUint) Join

func (s SliceUint) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceUint) Last

func (s SliceUint) Last() (uint, error)

Last returns the last element from the slice

func (SliceUint) MapBool

func (s SliceUint) MapBool(f func(el uint) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapByte

func (s SliceUint) MapByte(f func(el uint) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapError

func (s SliceUint) MapError(f func(el uint) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapFloat32

func (s SliceUint) MapFloat32(f func(el uint) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapFloat64

func (s SliceUint) MapFloat64(f func(el uint) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapInt

func (s SliceUint) MapInt(f func(el uint) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapInt16

func (s SliceUint) MapInt16(f func(el uint) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapInt32

func (s SliceUint) MapInt32(f func(el uint) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapInt64

func (s SliceUint) MapInt64(f func(el uint) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapInt8

func (s SliceUint) MapInt8(f func(el uint) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapInterface

func (s SliceUint) MapInterface(f func(el uint) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapRune

func (s SliceUint) MapRune(f func(el uint) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapString

func (s SliceUint) MapString(f func(el uint) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapUint

func (s SliceUint) MapUint(f func(el uint) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapUint16

func (s SliceUint) MapUint16(f func(el uint) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapUint32

func (s SliceUint) MapUint32(f func(el uint) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapUint64

func (s SliceUint) MapUint64(f func(el uint) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) MapUint8

func (s SliceUint) MapUint8(f func(el uint) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint) Max

func (s SliceUint) Max() (uint, error)

Max returns the maximal element from arr

func (SliceUint) Min

func (s SliceUint) Min() (uint, error)

Min returns the minimal element from arr

func (SliceUint) Permutations

func (s SliceUint) Permutations(size int) chan []uint

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceUint) Product

func (s SliceUint) Product(repeat int) chan []uint

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceUint) ReduceBool

func (s SliceUint) ReduceBool(acc bool, f func(el uint, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceByte

func (s SliceUint) ReduceByte(acc byte, f func(el uint, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceError

func (s SliceUint) ReduceError(acc error, f func(el uint, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceFloat32

func (s SliceUint) ReduceFloat32(acc float32, f func(el uint, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceFloat64

func (s SliceUint) ReduceFloat64(acc float64, f func(el uint, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceInt

func (s SliceUint) ReduceInt(acc int, f func(el uint, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceInt16

func (s SliceUint) ReduceInt16(acc int16, f func(el uint, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceInt32

func (s SliceUint) ReduceInt32(acc int32, f func(el uint, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceInt64

func (s SliceUint) ReduceInt64(acc int64, f func(el uint, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceInt8

func (s SliceUint) ReduceInt8(acc int8, f func(el uint, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceInterface

func (s SliceUint) ReduceInterface(acc interface{}, f func(el uint, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceRune

func (s SliceUint) ReduceRune(acc rune, f func(el uint, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceString

func (s SliceUint) ReduceString(acc string, f func(el uint, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceUint

func (s SliceUint) ReduceUint(acc uint, f func(el uint, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceUint16

func (s SliceUint) ReduceUint16(acc uint16, f func(el uint, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceUint32

func (s SliceUint) ReduceUint32(acc uint32, f func(el uint, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceUint64

func (s SliceUint) ReduceUint64(acc uint64, f func(el uint, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceUint8

func (s SliceUint) ReduceUint8(acc uint8, f func(el uint, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint) ReduceWhileBool

func (s SliceUint) ReduceWhileBool(acc bool, f func(el uint, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileByte

func (s SliceUint) ReduceWhileByte(acc byte, f func(el uint, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileError

func (s SliceUint) ReduceWhileError(acc error, f func(el uint, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileFloat32

func (s SliceUint) ReduceWhileFloat32(acc float32, f func(el uint, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileFloat64

func (s SliceUint) ReduceWhileFloat64(acc float64, f func(el uint, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileInt

func (s SliceUint) ReduceWhileInt(acc int, f func(el uint, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileInt16

func (s SliceUint) ReduceWhileInt16(acc int16, f func(el uint, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileInt32

func (s SliceUint) ReduceWhileInt32(acc int32, f func(el uint, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileInt64

func (s SliceUint) ReduceWhileInt64(acc int64, f func(el uint, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileInt8

func (s SliceUint) ReduceWhileInt8(acc int8, f func(el uint, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileInterface

func (s SliceUint) ReduceWhileInterface(acc interface{}, f func(el uint, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileRune

func (s SliceUint) ReduceWhileRune(acc rune, f func(el uint, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileString

func (s SliceUint) ReduceWhileString(acc string, f func(el uint, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileUint

func (s SliceUint) ReduceWhileUint(acc uint, f func(el uint, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileUint16

func (s SliceUint) ReduceWhileUint16(acc uint16, f func(el uint, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileUint32

func (s SliceUint) ReduceWhileUint32(acc uint32, f func(el uint, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileUint64

func (s SliceUint) ReduceWhileUint64(acc uint64, f func(el uint, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) ReduceWhileUint8

func (s SliceUint) ReduceWhileUint8(acc uint8, f func(el uint, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint) Reverse

func (s SliceUint) Reverse() []uint

Reverse returns given arr in reversed order

func (SliceUint) Same

func (s SliceUint) Same() bool

Same returns true if all element in arr the same

func (SliceUint) ScanBool

func (s SliceUint) ScanBool(acc bool, f func(el uint, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanByte

func (s SliceUint) ScanByte(acc byte, f func(el uint, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanError

func (s SliceUint) ScanError(acc error, f func(el uint, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanFloat32

func (s SliceUint) ScanFloat32(acc float32, f func(el uint, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanFloat64

func (s SliceUint) ScanFloat64(acc float64, f func(el uint, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanInt

func (s SliceUint) ScanInt(acc int, f func(el uint, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanInt16

func (s SliceUint) ScanInt16(acc int16, f func(el uint, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanInt32

func (s SliceUint) ScanInt32(acc int32, f func(el uint, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanInt64

func (s SliceUint) ScanInt64(acc int64, f func(el uint, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanInt8

func (s SliceUint) ScanInt8(acc int8, f func(el uint, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanInterface

func (s SliceUint) ScanInterface(acc interface{}, f func(el uint, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanRune

func (s SliceUint) ScanRune(acc rune, f func(el uint, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanString

func (s SliceUint) ScanString(acc string, f func(el uint, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanUint

func (s SliceUint) ScanUint(acc uint, f func(el uint, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanUint16

func (s SliceUint) ScanUint16(acc uint16, f func(el uint, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanUint32

func (s SliceUint) ScanUint32(acc uint32, f func(el uint, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanUint64

func (s SliceUint) ScanUint64(acc uint64, f func(el uint, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceUint) ScanUint8

func (s SliceUint) ScanUint8(acc uint8, f func(el uint, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceUint) Shuffle

func (s SliceUint) Shuffle(seed int64) []uint

Shuffle in random order arr elements

func (SliceUint) Sort

func (s SliceUint) Sort() []uint

Sort returns sorted slice

func (SliceUint) Sorted

func (s SliceUint) Sorted() bool

Sorted returns true if slice is sorted

func (SliceUint) Split

func (s SliceUint) Split(sep uint) [][]uint

Split splits arr by sep

func (SliceUint) StartsWith

func (s SliceUint) StartsWith(prefix []uint) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceUint) Sum

func (s SliceUint) Sum() uint

Sum return sum of all elements from arr

func (SliceUint) TakeEvery

func (s SliceUint) TakeEvery(nth int, from int) ([]uint, error)

TakeEvery returns slice of every nth elements

func (SliceUint) TakeRandom

func (s SliceUint) TakeRandom(count int, seed int64) ([]uint, error)

TakeRandom returns slice of count random elements from the slice

func (SliceUint) TakeWhile

func (s SliceUint) TakeWhile(f func(el uint) bool) []uint

TakeWhile takes elements from arr while f returns true

func (SliceUint) ToChannel

func (s SliceUint) ToChannel() chan uint

ToChannel returns channel with elements from the slice

func (SliceUint) Uniq

func (s SliceUint) Uniq() []uint

Uniq returns arr with only first occurences of every element.

func (SliceUint) Window

func (s SliceUint) Window(size int) ([][]uint, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceUint) Without

func (s SliceUint) Without(elements ...uint) []uint

Without returns the slice with filtered out element

type SliceUint16

type SliceUint16 struct {
	Data []uint16
}

Slice is a set of operations to work with slice

func (SliceUint16) All

func (s SliceUint16) All(f func(el uint16) bool) bool

All returns true if f returns true for all elements in arr

func (SliceUint16) Any

func (s SliceUint16) Any(f func(el uint16) bool) bool

Any returns true if f returns true for any element in arr

func (SliceUint16) Choice

func (s SliceUint16) Choice(seed int64) (uint16, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceUint16) ChunkByBool

func (s SliceUint16) ChunkByBool(f func(el uint16) bool) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByByte

func (s SliceUint16) ChunkByByte(f func(el uint16) byte) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByError

func (s SliceUint16) ChunkByError(f func(el uint16) error) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByFloat32

func (s SliceUint16) ChunkByFloat32(f func(el uint16) float32) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByFloat64

func (s SliceUint16) ChunkByFloat64(f func(el uint16) float64) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByInt

func (s SliceUint16) ChunkByInt(f func(el uint16) int) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByInt16

func (s SliceUint16) ChunkByInt16(f func(el uint16) int16) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByInt32

func (s SliceUint16) ChunkByInt32(f func(el uint16) int32) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByInt64

func (s SliceUint16) ChunkByInt64(f func(el uint16) int64) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByInt8

func (s SliceUint16) ChunkByInt8(f func(el uint16) int8) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByInterface

func (s SliceUint16) ChunkByInterface(f func(el uint16) interface{}) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByRune

func (s SliceUint16) ChunkByRune(f func(el uint16) rune) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByString

func (s SliceUint16) ChunkByString(f func(el uint16) string) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByUint

func (s SliceUint16) ChunkByUint(f func(el uint16) uint) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByUint16

func (s SliceUint16) ChunkByUint16(f func(el uint16) uint16) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByUint32

func (s SliceUint16) ChunkByUint32(f func(el uint16) uint32) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByUint64

func (s SliceUint16) ChunkByUint64(f func(el uint16) uint64) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkByUint8

func (s SliceUint16) ChunkByUint8(f func(el uint16) uint8) [][]uint16

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint16) ChunkEvery

func (s SliceUint16) ChunkEvery(count int) ([][]uint16, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceUint16) Contains

func (s SliceUint16) Contains(el uint16) bool

Contains returns true if el in arr.

func (SliceUint16) Count

func (s SliceUint16) Count(el uint16) int

Count return count of el occurences in arr.

func (SliceUint16) CountBy

func (s SliceUint16) CountBy(f func(el uint16) bool) int

CountBy returns how many times f returns true.

func (SliceUint16) Cycle

func (s SliceUint16) Cycle() chan uint16

Cycle is an infinite loop over slice

func (SliceUint16) Dedup

func (s SliceUint16) Dedup() []uint16

Dedup returns a given slice without consecutive duplicated elements

func (SliceUint16) DedupByBool

func (s SliceUint16) DedupByBool(f func(el uint16) bool) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByByte

func (s SliceUint16) DedupByByte(f func(el uint16) byte) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByError

func (s SliceUint16) DedupByError(f func(el uint16) error) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByFloat32

func (s SliceUint16) DedupByFloat32(f func(el uint16) float32) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByFloat64

func (s SliceUint16) DedupByFloat64(f func(el uint16) float64) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByInt

func (s SliceUint16) DedupByInt(f func(el uint16) int) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByInt16

func (s SliceUint16) DedupByInt16(f func(el uint16) int16) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByInt32

func (s SliceUint16) DedupByInt32(f func(el uint16) int32) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByInt64

func (s SliceUint16) DedupByInt64(f func(el uint16) int64) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByInt8

func (s SliceUint16) DedupByInt8(f func(el uint16) int8) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByInterface

func (s SliceUint16) DedupByInterface(f func(el uint16) interface{}) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByRune

func (s SliceUint16) DedupByRune(f func(el uint16) rune) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByString

func (s SliceUint16) DedupByString(f func(el uint16) string) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByUint

func (s SliceUint16) DedupByUint(f func(el uint16) uint) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByUint16

func (s SliceUint16) DedupByUint16(f func(el uint16) uint16) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByUint32

func (s SliceUint16) DedupByUint32(f func(el uint16) uint32) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByUint64

func (s SliceUint16) DedupByUint64(f func(el uint16) uint64) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) DedupByUint8

func (s SliceUint16) DedupByUint8(f func(el uint16) uint8) []uint16

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint16) Delete

func (s SliceUint16) Delete(element uint16) []uint16

Delete deletes the first occurence of the element from the slice

func (SliceUint16) DeleteAll

func (s SliceUint16) DeleteAll(element uint16) []uint16

DeleteAll deletes all occurences of the element from the slice

func (SliceUint16) DeleteAt

func (s SliceUint16) DeleteAt(indices ...int) ([]uint16, error)

DeleteAt returns the slice without elements on given positions

func (SliceUint16) DropEvery

func (s SliceUint16) DropEvery(nth int, from int) ([]uint16, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceUint16) DropWhile

func (s SliceUint16) DropWhile(f func(el uint16) bool) []uint16

DropWhile drops elements from arr while f returns true

func (SliceUint16) Each

func (s SliceUint16) Each(f func(el uint16))

Each calls f for every element from arr

func (SliceUint16) EndsWith

func (s SliceUint16) EndsWith(suffix []uint16) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceUint16) Equal

func (s SliceUint16) Equal(other []uint16) bool

Equal returns true if slices are equal

func (SliceUint16) Filter

func (s SliceUint16) Filter(f func(el uint16) bool) []uint16

Filter returns slice of T for which F returned true

func (SliceUint16) Find

func (s SliceUint16) Find(f func(el uint16) bool) (uint16, error)

Find returns the first element for which f returns true

func (SliceUint16) FindIndex

func (s SliceUint16) FindIndex(f func(el uint16) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceUint16) GroupByBool

func (s SliceUint16) GroupByBool(f func(el uint16) bool) map[bool][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByByte

func (s SliceUint16) GroupByByte(f func(el uint16) byte) map[byte][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByError

func (s SliceUint16) GroupByError(f func(el uint16) error) map[error][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByFloat32

func (s SliceUint16) GroupByFloat32(f func(el uint16) float32) map[float32][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByFloat64

func (s SliceUint16) GroupByFloat64(f func(el uint16) float64) map[float64][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByInt

func (s SliceUint16) GroupByInt(f func(el uint16) int) map[int][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByInt16

func (s SliceUint16) GroupByInt16(f func(el uint16) int16) map[int16][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByInt32

func (s SliceUint16) GroupByInt32(f func(el uint16) int32) map[int32][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByInt64

func (s SliceUint16) GroupByInt64(f func(el uint16) int64) map[int64][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByInt8

func (s SliceUint16) GroupByInt8(f func(el uint16) int8) map[int8][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByInterface

func (s SliceUint16) GroupByInterface(f func(el uint16) interface{}) map[interface{}][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByRune

func (s SliceUint16) GroupByRune(f func(el uint16) rune) map[rune][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByString

func (s SliceUint16) GroupByString(f func(el uint16) string) map[string][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByUint

func (s SliceUint16) GroupByUint(f func(el uint16) uint) map[uint][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByUint16

func (s SliceUint16) GroupByUint16(f func(el uint16) uint16) map[uint16][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByUint32

func (s SliceUint16) GroupByUint32(f func(el uint16) uint32) map[uint32][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByUint64

func (s SliceUint16) GroupByUint64(f func(el uint16) uint64) map[uint64][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) GroupByUint8

func (s SliceUint16) GroupByUint8(f func(el uint16) uint8) map[uint8][]uint16

GroupBy groups element from array by value returned by f

func (SliceUint16) InsertAt

func (s SliceUint16) InsertAt(index int, element uint16) ([]uint16, error)

InsertAt returns the slice with element inserted at given index.

func (SliceUint16) Intersperse

func (s SliceUint16) Intersperse(el uint16) []uint16

Intersperse inserts el between each element of arr

func (SliceUint16) Join

func (s SliceUint16) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceUint16) Last

func (s SliceUint16) Last() (uint16, error)

Last returns the last element from the slice

func (SliceUint16) MapBool

func (s SliceUint16) MapBool(f func(el uint16) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapByte

func (s SliceUint16) MapByte(f func(el uint16) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapError

func (s SliceUint16) MapError(f func(el uint16) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapFloat32

func (s SliceUint16) MapFloat32(f func(el uint16) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapFloat64

func (s SliceUint16) MapFloat64(f func(el uint16) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapInt

func (s SliceUint16) MapInt(f func(el uint16) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapInt16

func (s SliceUint16) MapInt16(f func(el uint16) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapInt32

func (s SliceUint16) MapInt32(f func(el uint16) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapInt64

func (s SliceUint16) MapInt64(f func(el uint16) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapInt8

func (s SliceUint16) MapInt8(f func(el uint16) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapInterface

func (s SliceUint16) MapInterface(f func(el uint16) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapRune

func (s SliceUint16) MapRune(f func(el uint16) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapString

func (s SliceUint16) MapString(f func(el uint16) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapUint

func (s SliceUint16) MapUint(f func(el uint16) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapUint16

func (s SliceUint16) MapUint16(f func(el uint16) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapUint32

func (s SliceUint16) MapUint32(f func(el uint16) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapUint64

func (s SliceUint16) MapUint64(f func(el uint16) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) MapUint8

func (s SliceUint16) MapUint8(f func(el uint16) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint16) Max

func (s SliceUint16) Max() (uint16, error)

Max returns the maximal element from arr

func (SliceUint16) Min

func (s SliceUint16) Min() (uint16, error)

Min returns the minimal element from arr

func (SliceUint16) Permutations

func (s SliceUint16) Permutations(size int) chan []uint16

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceUint16) Product

func (s SliceUint16) Product(repeat int) chan []uint16

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceUint16) ReduceBool

func (s SliceUint16) ReduceBool(acc bool, f func(el uint16, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceByte

func (s SliceUint16) ReduceByte(acc byte, f func(el uint16, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceError

func (s SliceUint16) ReduceError(acc error, f func(el uint16, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceFloat32

func (s SliceUint16) ReduceFloat32(acc float32, f func(el uint16, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceFloat64

func (s SliceUint16) ReduceFloat64(acc float64, f func(el uint16, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceInt

func (s SliceUint16) ReduceInt(acc int, f func(el uint16, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceInt16

func (s SliceUint16) ReduceInt16(acc int16, f func(el uint16, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceInt32

func (s SliceUint16) ReduceInt32(acc int32, f func(el uint16, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceInt64

func (s SliceUint16) ReduceInt64(acc int64, f func(el uint16, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceInt8

func (s SliceUint16) ReduceInt8(acc int8, f func(el uint16, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceInterface

func (s SliceUint16) ReduceInterface(acc interface{}, f func(el uint16, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceRune

func (s SliceUint16) ReduceRune(acc rune, f func(el uint16, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceString

func (s SliceUint16) ReduceString(acc string, f func(el uint16, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceUint

func (s SliceUint16) ReduceUint(acc uint, f func(el uint16, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceUint16

func (s SliceUint16) ReduceUint16(acc uint16, f func(el uint16, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceUint32

func (s SliceUint16) ReduceUint32(acc uint32, f func(el uint16, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceUint64

func (s SliceUint16) ReduceUint64(acc uint64, f func(el uint16, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceUint8

func (s SliceUint16) ReduceUint8(acc uint8, f func(el uint16, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint16) ReduceWhileBool

func (s SliceUint16) ReduceWhileBool(acc bool, f func(el uint16, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileByte

func (s SliceUint16) ReduceWhileByte(acc byte, f func(el uint16, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileError

func (s SliceUint16) ReduceWhileError(acc error, f func(el uint16, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileFloat32

func (s SliceUint16) ReduceWhileFloat32(acc float32, f func(el uint16, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileFloat64

func (s SliceUint16) ReduceWhileFloat64(acc float64, f func(el uint16, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileInt

func (s SliceUint16) ReduceWhileInt(acc int, f func(el uint16, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileInt16

func (s SliceUint16) ReduceWhileInt16(acc int16, f func(el uint16, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileInt32

func (s SliceUint16) ReduceWhileInt32(acc int32, f func(el uint16, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileInt64

func (s SliceUint16) ReduceWhileInt64(acc int64, f func(el uint16, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileInt8

func (s SliceUint16) ReduceWhileInt8(acc int8, f func(el uint16, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileInterface

func (s SliceUint16) ReduceWhileInterface(acc interface{}, f func(el uint16, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileRune

func (s SliceUint16) ReduceWhileRune(acc rune, f func(el uint16, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileString

func (s SliceUint16) ReduceWhileString(acc string, f func(el uint16, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileUint

func (s SliceUint16) ReduceWhileUint(acc uint, f func(el uint16, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileUint16

func (s SliceUint16) ReduceWhileUint16(acc uint16, f func(el uint16, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileUint32

func (s SliceUint16) ReduceWhileUint32(acc uint32, f func(el uint16, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileUint64

func (s SliceUint16) ReduceWhileUint64(acc uint64, f func(el uint16, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) ReduceWhileUint8

func (s SliceUint16) ReduceWhileUint8(acc uint8, f func(el uint16, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint16) Reverse

func (s SliceUint16) Reverse() []uint16

Reverse returns given arr in reversed order

func (SliceUint16) Same

func (s SliceUint16) Same() bool

Same returns true if all element in arr the same

func (SliceUint16) ScanBool

func (s SliceUint16) ScanBool(acc bool, f func(el uint16, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanByte

func (s SliceUint16) ScanByte(acc byte, f func(el uint16, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanError

func (s SliceUint16) ScanError(acc error, f func(el uint16, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanFloat32

func (s SliceUint16) ScanFloat32(acc float32, f func(el uint16, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanFloat64

func (s SliceUint16) ScanFloat64(acc float64, f func(el uint16, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanInt

func (s SliceUint16) ScanInt(acc int, f func(el uint16, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanInt16

func (s SliceUint16) ScanInt16(acc int16, f func(el uint16, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanInt32

func (s SliceUint16) ScanInt32(acc int32, f func(el uint16, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanInt64

func (s SliceUint16) ScanInt64(acc int64, f func(el uint16, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanInt8

func (s SliceUint16) ScanInt8(acc int8, f func(el uint16, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanInterface

func (s SliceUint16) ScanInterface(acc interface{}, f func(el uint16, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanRune

func (s SliceUint16) ScanRune(acc rune, f func(el uint16, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanString

func (s SliceUint16) ScanString(acc string, f func(el uint16, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanUint

func (s SliceUint16) ScanUint(acc uint, f func(el uint16, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanUint16

func (s SliceUint16) ScanUint16(acc uint16, f func(el uint16, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanUint32

func (s SliceUint16) ScanUint32(acc uint32, f func(el uint16, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanUint64

func (s SliceUint16) ScanUint64(acc uint64, f func(el uint16, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceUint16) ScanUint8

func (s SliceUint16) ScanUint8(acc uint8, f func(el uint16, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceUint16) Shuffle

func (s SliceUint16) Shuffle(seed int64) []uint16

Shuffle in random order arr elements

func (SliceUint16) Sort

func (s SliceUint16) Sort() []uint16

Sort returns sorted slice

func (SliceUint16) Sorted

func (s SliceUint16) Sorted() bool

Sorted returns true if slice is sorted

func (SliceUint16) Split

func (s SliceUint16) Split(sep uint16) [][]uint16

Split splits arr by sep

func (SliceUint16) StartsWith

func (s SliceUint16) StartsWith(prefix []uint16) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceUint16) Sum

func (s SliceUint16) Sum() uint16

Sum return sum of all elements from arr

func (SliceUint16) TakeEvery

func (s SliceUint16) TakeEvery(nth int, from int) ([]uint16, error)

TakeEvery returns slice of every nth elements

func (SliceUint16) TakeRandom

func (s SliceUint16) TakeRandom(count int, seed int64) ([]uint16, error)

TakeRandom returns slice of count random elements from the slice

func (SliceUint16) TakeWhile

func (s SliceUint16) TakeWhile(f func(el uint16) bool) []uint16

TakeWhile takes elements from arr while f returns true

func (SliceUint16) ToChannel

func (s SliceUint16) ToChannel() chan uint16

ToChannel returns channel with elements from the slice

func (SliceUint16) Uniq

func (s SliceUint16) Uniq() []uint16

Uniq returns arr with only first occurences of every element.

func (SliceUint16) Window

func (s SliceUint16) Window(size int) ([][]uint16, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceUint16) Without

func (s SliceUint16) Without(elements ...uint16) []uint16

Without returns the slice with filtered out element

type SliceUint32

type SliceUint32 struct {
	Data []uint32
}

Slice is a set of operations to work with slice

func (SliceUint32) All

func (s SliceUint32) All(f func(el uint32) bool) bool

All returns true if f returns true for all elements in arr

func (SliceUint32) Any

func (s SliceUint32) Any(f func(el uint32) bool) bool

Any returns true if f returns true for any element in arr

func (SliceUint32) Choice

func (s SliceUint32) Choice(seed int64) (uint32, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceUint32) ChunkByBool

func (s SliceUint32) ChunkByBool(f func(el uint32) bool) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByByte

func (s SliceUint32) ChunkByByte(f func(el uint32) byte) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByError

func (s SliceUint32) ChunkByError(f func(el uint32) error) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByFloat32

func (s SliceUint32) ChunkByFloat32(f func(el uint32) float32) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByFloat64

func (s SliceUint32) ChunkByFloat64(f func(el uint32) float64) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByInt

func (s SliceUint32) ChunkByInt(f func(el uint32) int) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByInt16

func (s SliceUint32) ChunkByInt16(f func(el uint32) int16) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByInt32

func (s SliceUint32) ChunkByInt32(f func(el uint32) int32) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByInt64

func (s SliceUint32) ChunkByInt64(f func(el uint32) int64) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByInt8

func (s SliceUint32) ChunkByInt8(f func(el uint32) int8) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByInterface

func (s SliceUint32) ChunkByInterface(f func(el uint32) interface{}) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByRune

func (s SliceUint32) ChunkByRune(f func(el uint32) rune) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByString

func (s SliceUint32) ChunkByString(f func(el uint32) string) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByUint

func (s SliceUint32) ChunkByUint(f func(el uint32) uint) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByUint16

func (s SliceUint32) ChunkByUint16(f func(el uint32) uint16) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByUint32

func (s SliceUint32) ChunkByUint32(f func(el uint32) uint32) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByUint64

func (s SliceUint32) ChunkByUint64(f func(el uint32) uint64) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkByUint8

func (s SliceUint32) ChunkByUint8(f func(el uint32) uint8) [][]uint32

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint32) ChunkEvery

func (s SliceUint32) ChunkEvery(count int) ([][]uint32, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceUint32) Contains

func (s SliceUint32) Contains(el uint32) bool

Contains returns true if el in arr.

func (SliceUint32) Count

func (s SliceUint32) Count(el uint32) int

Count return count of el occurences in arr.

func (SliceUint32) CountBy

func (s SliceUint32) CountBy(f func(el uint32) bool) int

CountBy returns how many times f returns true.

func (SliceUint32) Cycle

func (s SliceUint32) Cycle() chan uint32

Cycle is an infinite loop over slice

func (SliceUint32) Dedup

func (s SliceUint32) Dedup() []uint32

Dedup returns a given slice without consecutive duplicated elements

func (SliceUint32) DedupByBool

func (s SliceUint32) DedupByBool(f func(el uint32) bool) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByByte

func (s SliceUint32) DedupByByte(f func(el uint32) byte) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByError

func (s SliceUint32) DedupByError(f func(el uint32) error) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByFloat32

func (s SliceUint32) DedupByFloat32(f func(el uint32) float32) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByFloat64

func (s SliceUint32) DedupByFloat64(f func(el uint32) float64) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByInt

func (s SliceUint32) DedupByInt(f func(el uint32) int) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByInt16

func (s SliceUint32) DedupByInt16(f func(el uint32) int16) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByInt32

func (s SliceUint32) DedupByInt32(f func(el uint32) int32) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByInt64

func (s SliceUint32) DedupByInt64(f func(el uint32) int64) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByInt8

func (s SliceUint32) DedupByInt8(f func(el uint32) int8) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByInterface

func (s SliceUint32) DedupByInterface(f func(el uint32) interface{}) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByRune

func (s SliceUint32) DedupByRune(f func(el uint32) rune) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByString

func (s SliceUint32) DedupByString(f func(el uint32) string) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByUint

func (s SliceUint32) DedupByUint(f func(el uint32) uint) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByUint16

func (s SliceUint32) DedupByUint16(f func(el uint32) uint16) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByUint32

func (s SliceUint32) DedupByUint32(f func(el uint32) uint32) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByUint64

func (s SliceUint32) DedupByUint64(f func(el uint32) uint64) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) DedupByUint8

func (s SliceUint32) DedupByUint8(f func(el uint32) uint8) []uint32

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint32) Delete

func (s SliceUint32) Delete(element uint32) []uint32

Delete deletes the first occurence of the element from the slice

func (SliceUint32) DeleteAll

func (s SliceUint32) DeleteAll(element uint32) []uint32

DeleteAll deletes all occurences of the element from the slice

func (SliceUint32) DeleteAt

func (s SliceUint32) DeleteAt(indices ...int) ([]uint32, error)

DeleteAt returns the slice without elements on given positions

func (SliceUint32) DropEvery

func (s SliceUint32) DropEvery(nth int, from int) ([]uint32, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceUint32) DropWhile

func (s SliceUint32) DropWhile(f func(el uint32) bool) []uint32

DropWhile drops elements from arr while f returns true

func (SliceUint32) Each

func (s SliceUint32) Each(f func(el uint32))

Each calls f for every element from arr

func (SliceUint32) EndsWith

func (s SliceUint32) EndsWith(suffix []uint32) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceUint32) Equal

func (s SliceUint32) Equal(other []uint32) bool

Equal returns true if slices are equal

func (SliceUint32) Filter

func (s SliceUint32) Filter(f func(el uint32) bool) []uint32

Filter returns slice of T for which F returned true

func (SliceUint32) Find

func (s SliceUint32) Find(f func(el uint32) bool) (uint32, error)

Find returns the first element for which f returns true

func (SliceUint32) FindIndex

func (s SliceUint32) FindIndex(f func(el uint32) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceUint32) GroupByBool

func (s SliceUint32) GroupByBool(f func(el uint32) bool) map[bool][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByByte

func (s SliceUint32) GroupByByte(f func(el uint32) byte) map[byte][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByError

func (s SliceUint32) GroupByError(f func(el uint32) error) map[error][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByFloat32

func (s SliceUint32) GroupByFloat32(f func(el uint32) float32) map[float32][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByFloat64

func (s SliceUint32) GroupByFloat64(f func(el uint32) float64) map[float64][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByInt

func (s SliceUint32) GroupByInt(f func(el uint32) int) map[int][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByInt16

func (s SliceUint32) GroupByInt16(f func(el uint32) int16) map[int16][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByInt32

func (s SliceUint32) GroupByInt32(f func(el uint32) int32) map[int32][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByInt64

func (s SliceUint32) GroupByInt64(f func(el uint32) int64) map[int64][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByInt8

func (s SliceUint32) GroupByInt8(f func(el uint32) int8) map[int8][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByInterface

func (s SliceUint32) GroupByInterface(f func(el uint32) interface{}) map[interface{}][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByRune

func (s SliceUint32) GroupByRune(f func(el uint32) rune) map[rune][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByString

func (s SliceUint32) GroupByString(f func(el uint32) string) map[string][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByUint

func (s SliceUint32) GroupByUint(f func(el uint32) uint) map[uint][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByUint16

func (s SliceUint32) GroupByUint16(f func(el uint32) uint16) map[uint16][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByUint32

func (s SliceUint32) GroupByUint32(f func(el uint32) uint32) map[uint32][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByUint64

func (s SliceUint32) GroupByUint64(f func(el uint32) uint64) map[uint64][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) GroupByUint8

func (s SliceUint32) GroupByUint8(f func(el uint32) uint8) map[uint8][]uint32

GroupBy groups element from array by value returned by f

func (SliceUint32) InsertAt

func (s SliceUint32) InsertAt(index int, element uint32) ([]uint32, error)

InsertAt returns the slice with element inserted at given index.

func (SliceUint32) Intersperse

func (s SliceUint32) Intersperse(el uint32) []uint32

Intersperse inserts el between each element of arr

func (SliceUint32) Join

func (s SliceUint32) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceUint32) Last

func (s SliceUint32) Last() (uint32, error)

Last returns the last element from the slice

func (SliceUint32) MapBool

func (s SliceUint32) MapBool(f func(el uint32) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapByte

func (s SliceUint32) MapByte(f func(el uint32) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapError

func (s SliceUint32) MapError(f func(el uint32) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapFloat32

func (s SliceUint32) MapFloat32(f func(el uint32) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapFloat64

func (s SliceUint32) MapFloat64(f func(el uint32) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapInt

func (s SliceUint32) MapInt(f func(el uint32) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapInt16

func (s SliceUint32) MapInt16(f func(el uint32) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapInt32

func (s SliceUint32) MapInt32(f func(el uint32) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapInt64

func (s SliceUint32) MapInt64(f func(el uint32) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapInt8

func (s SliceUint32) MapInt8(f func(el uint32) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapInterface

func (s SliceUint32) MapInterface(f func(el uint32) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapRune

func (s SliceUint32) MapRune(f func(el uint32) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapString

func (s SliceUint32) MapString(f func(el uint32) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapUint

func (s SliceUint32) MapUint(f func(el uint32) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapUint16

func (s SliceUint32) MapUint16(f func(el uint32) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapUint32

func (s SliceUint32) MapUint32(f func(el uint32) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapUint64

func (s SliceUint32) MapUint64(f func(el uint32) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) MapUint8

func (s SliceUint32) MapUint8(f func(el uint32) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint32) Max

func (s SliceUint32) Max() (uint32, error)

Max returns the maximal element from arr

func (SliceUint32) Min

func (s SliceUint32) Min() (uint32, error)

Min returns the minimal element from arr

func (SliceUint32) Permutations

func (s SliceUint32) Permutations(size int) chan []uint32

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceUint32) Product

func (s SliceUint32) Product(repeat int) chan []uint32

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceUint32) ReduceBool

func (s SliceUint32) ReduceBool(acc bool, f func(el uint32, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceByte

func (s SliceUint32) ReduceByte(acc byte, f func(el uint32, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceError

func (s SliceUint32) ReduceError(acc error, f func(el uint32, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceFloat32

func (s SliceUint32) ReduceFloat32(acc float32, f func(el uint32, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceFloat64

func (s SliceUint32) ReduceFloat64(acc float64, f func(el uint32, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceInt

func (s SliceUint32) ReduceInt(acc int, f func(el uint32, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceInt16

func (s SliceUint32) ReduceInt16(acc int16, f func(el uint32, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceInt32

func (s SliceUint32) ReduceInt32(acc int32, f func(el uint32, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceInt64

func (s SliceUint32) ReduceInt64(acc int64, f func(el uint32, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceInt8

func (s SliceUint32) ReduceInt8(acc int8, f func(el uint32, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceInterface

func (s SliceUint32) ReduceInterface(acc interface{}, f func(el uint32, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceRune

func (s SliceUint32) ReduceRune(acc rune, f func(el uint32, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceString

func (s SliceUint32) ReduceString(acc string, f func(el uint32, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceUint

func (s SliceUint32) ReduceUint(acc uint, f func(el uint32, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceUint16

func (s SliceUint32) ReduceUint16(acc uint16, f func(el uint32, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceUint32

func (s SliceUint32) ReduceUint32(acc uint32, f func(el uint32, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceUint64

func (s SliceUint32) ReduceUint64(acc uint64, f func(el uint32, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceUint8

func (s SliceUint32) ReduceUint8(acc uint8, f func(el uint32, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint32) ReduceWhileBool

func (s SliceUint32) ReduceWhileBool(acc bool, f func(el uint32, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileByte

func (s SliceUint32) ReduceWhileByte(acc byte, f func(el uint32, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileError

func (s SliceUint32) ReduceWhileError(acc error, f func(el uint32, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileFloat32

func (s SliceUint32) ReduceWhileFloat32(acc float32, f func(el uint32, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileFloat64

func (s SliceUint32) ReduceWhileFloat64(acc float64, f func(el uint32, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileInt

func (s SliceUint32) ReduceWhileInt(acc int, f func(el uint32, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileInt16

func (s SliceUint32) ReduceWhileInt16(acc int16, f func(el uint32, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileInt32

func (s SliceUint32) ReduceWhileInt32(acc int32, f func(el uint32, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileInt64

func (s SliceUint32) ReduceWhileInt64(acc int64, f func(el uint32, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileInt8

func (s SliceUint32) ReduceWhileInt8(acc int8, f func(el uint32, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileInterface

func (s SliceUint32) ReduceWhileInterface(acc interface{}, f func(el uint32, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileRune

func (s SliceUint32) ReduceWhileRune(acc rune, f func(el uint32, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileString

func (s SliceUint32) ReduceWhileString(acc string, f func(el uint32, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileUint

func (s SliceUint32) ReduceWhileUint(acc uint, f func(el uint32, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileUint16

func (s SliceUint32) ReduceWhileUint16(acc uint16, f func(el uint32, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileUint32

func (s SliceUint32) ReduceWhileUint32(acc uint32, f func(el uint32, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileUint64

func (s SliceUint32) ReduceWhileUint64(acc uint64, f func(el uint32, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) ReduceWhileUint8

func (s SliceUint32) ReduceWhileUint8(acc uint8, f func(el uint32, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint32) Reverse

func (s SliceUint32) Reverse() []uint32

Reverse returns given arr in reversed order

func (SliceUint32) Same

func (s SliceUint32) Same() bool

Same returns true if all element in arr the same

func (SliceUint32) ScanBool

func (s SliceUint32) ScanBool(acc bool, f func(el uint32, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanByte

func (s SliceUint32) ScanByte(acc byte, f func(el uint32, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanError

func (s SliceUint32) ScanError(acc error, f func(el uint32, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanFloat32

func (s SliceUint32) ScanFloat32(acc float32, f func(el uint32, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanFloat64

func (s SliceUint32) ScanFloat64(acc float64, f func(el uint32, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanInt

func (s SliceUint32) ScanInt(acc int, f func(el uint32, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanInt16

func (s SliceUint32) ScanInt16(acc int16, f func(el uint32, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanInt32

func (s SliceUint32) ScanInt32(acc int32, f func(el uint32, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanInt64

func (s SliceUint32) ScanInt64(acc int64, f func(el uint32, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanInt8

func (s SliceUint32) ScanInt8(acc int8, f func(el uint32, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanInterface

func (s SliceUint32) ScanInterface(acc interface{}, f func(el uint32, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanRune

func (s SliceUint32) ScanRune(acc rune, f func(el uint32, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanString

func (s SliceUint32) ScanString(acc string, f func(el uint32, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanUint

func (s SliceUint32) ScanUint(acc uint, f func(el uint32, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanUint16

func (s SliceUint32) ScanUint16(acc uint16, f func(el uint32, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanUint32

func (s SliceUint32) ScanUint32(acc uint32, f func(el uint32, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanUint64

func (s SliceUint32) ScanUint64(acc uint64, f func(el uint32, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceUint32) ScanUint8

func (s SliceUint32) ScanUint8(acc uint8, f func(el uint32, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceUint32) Shuffle

func (s SliceUint32) Shuffle(seed int64) []uint32

Shuffle in random order arr elements

func (SliceUint32) Sort

func (s SliceUint32) Sort() []uint32

Sort returns sorted slice

func (SliceUint32) Sorted

func (s SliceUint32) Sorted() bool

Sorted returns true if slice is sorted

func (SliceUint32) Split

func (s SliceUint32) Split(sep uint32) [][]uint32

Split splits arr by sep

func (SliceUint32) StartsWith

func (s SliceUint32) StartsWith(prefix []uint32) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceUint32) Sum

func (s SliceUint32) Sum() uint32

Sum return sum of all elements from arr

func (SliceUint32) TakeEvery

func (s SliceUint32) TakeEvery(nth int, from int) ([]uint32, error)

TakeEvery returns slice of every nth elements

func (SliceUint32) TakeRandom

func (s SliceUint32) TakeRandom(count int, seed int64) ([]uint32, error)

TakeRandom returns slice of count random elements from the slice

func (SliceUint32) TakeWhile

func (s SliceUint32) TakeWhile(f func(el uint32) bool) []uint32

TakeWhile takes elements from arr while f returns true

func (SliceUint32) ToChannel

func (s SliceUint32) ToChannel() chan uint32

ToChannel returns channel with elements from the slice

func (SliceUint32) Uniq

func (s SliceUint32) Uniq() []uint32

Uniq returns arr with only first occurences of every element.

func (SliceUint32) Window

func (s SliceUint32) Window(size int) ([][]uint32, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceUint32) Without

func (s SliceUint32) Without(elements ...uint32) []uint32

Without returns the slice with filtered out element

type SliceUint64

type SliceUint64 struct {
	Data []uint64
}

Slice is a set of operations to work with slice

func (SliceUint64) All

func (s SliceUint64) All(f func(el uint64) bool) bool

All returns true if f returns true for all elements in arr

func (SliceUint64) Any

func (s SliceUint64) Any(f func(el uint64) bool) bool

Any returns true if f returns true for any element in arr

func (SliceUint64) Choice

func (s SliceUint64) Choice(seed int64) (uint64, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceUint64) ChunkByBool

func (s SliceUint64) ChunkByBool(f func(el uint64) bool) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByByte

func (s SliceUint64) ChunkByByte(f func(el uint64) byte) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByError

func (s SliceUint64) ChunkByError(f func(el uint64) error) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByFloat32

func (s SliceUint64) ChunkByFloat32(f func(el uint64) float32) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByFloat64

func (s SliceUint64) ChunkByFloat64(f func(el uint64) float64) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByInt

func (s SliceUint64) ChunkByInt(f func(el uint64) int) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByInt16

func (s SliceUint64) ChunkByInt16(f func(el uint64) int16) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByInt32

func (s SliceUint64) ChunkByInt32(f func(el uint64) int32) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByInt64

func (s SliceUint64) ChunkByInt64(f func(el uint64) int64) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByInt8

func (s SliceUint64) ChunkByInt8(f func(el uint64) int8) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByInterface

func (s SliceUint64) ChunkByInterface(f func(el uint64) interface{}) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByRune

func (s SliceUint64) ChunkByRune(f func(el uint64) rune) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByString

func (s SliceUint64) ChunkByString(f func(el uint64) string) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByUint

func (s SliceUint64) ChunkByUint(f func(el uint64) uint) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByUint16

func (s SliceUint64) ChunkByUint16(f func(el uint64) uint16) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByUint32

func (s SliceUint64) ChunkByUint32(f func(el uint64) uint32) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByUint64

func (s SliceUint64) ChunkByUint64(f func(el uint64) uint64) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkByUint8

func (s SliceUint64) ChunkByUint8(f func(el uint64) uint8) [][]uint64

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint64) ChunkEvery

func (s SliceUint64) ChunkEvery(count int) ([][]uint64, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceUint64) Contains

func (s SliceUint64) Contains(el uint64) bool

Contains returns true if el in arr.

func (SliceUint64) Count

func (s SliceUint64) Count(el uint64) int

Count return count of el occurences in arr.

func (SliceUint64) CountBy

func (s SliceUint64) CountBy(f func(el uint64) bool) int

CountBy returns how many times f returns true.

func (SliceUint64) Cycle

func (s SliceUint64) Cycle() chan uint64

Cycle is an infinite loop over slice

func (SliceUint64) Dedup

func (s SliceUint64) Dedup() []uint64

Dedup returns a given slice without consecutive duplicated elements

func (SliceUint64) DedupByBool

func (s SliceUint64) DedupByBool(f func(el uint64) bool) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByByte

func (s SliceUint64) DedupByByte(f func(el uint64) byte) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByError

func (s SliceUint64) DedupByError(f func(el uint64) error) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByFloat32

func (s SliceUint64) DedupByFloat32(f func(el uint64) float32) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByFloat64

func (s SliceUint64) DedupByFloat64(f func(el uint64) float64) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByInt

func (s SliceUint64) DedupByInt(f func(el uint64) int) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByInt16

func (s SliceUint64) DedupByInt16(f func(el uint64) int16) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByInt32

func (s SliceUint64) DedupByInt32(f func(el uint64) int32) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByInt64

func (s SliceUint64) DedupByInt64(f func(el uint64) int64) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByInt8

func (s SliceUint64) DedupByInt8(f func(el uint64) int8) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByInterface

func (s SliceUint64) DedupByInterface(f func(el uint64) interface{}) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByRune

func (s SliceUint64) DedupByRune(f func(el uint64) rune) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByString

func (s SliceUint64) DedupByString(f func(el uint64) string) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByUint

func (s SliceUint64) DedupByUint(f func(el uint64) uint) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByUint16

func (s SliceUint64) DedupByUint16(f func(el uint64) uint16) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByUint32

func (s SliceUint64) DedupByUint32(f func(el uint64) uint32) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByUint64

func (s SliceUint64) DedupByUint64(f func(el uint64) uint64) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) DedupByUint8

func (s SliceUint64) DedupByUint8(f func(el uint64) uint8) []uint64

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint64) Delete

func (s SliceUint64) Delete(element uint64) []uint64

Delete deletes the first occurence of the element from the slice

func (SliceUint64) DeleteAll

func (s SliceUint64) DeleteAll(element uint64) []uint64

DeleteAll deletes all occurences of the element from the slice

func (SliceUint64) DeleteAt

func (s SliceUint64) DeleteAt(indices ...int) ([]uint64, error)

DeleteAt returns the slice without elements on given positions

func (SliceUint64) DropEvery

func (s SliceUint64) DropEvery(nth int, from int) ([]uint64, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceUint64) DropWhile

func (s SliceUint64) DropWhile(f func(el uint64) bool) []uint64

DropWhile drops elements from arr while f returns true

func (SliceUint64) Each

func (s SliceUint64) Each(f func(el uint64))

Each calls f for every element from arr

func (SliceUint64) EndsWith

func (s SliceUint64) EndsWith(suffix []uint64) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceUint64) Equal

func (s SliceUint64) Equal(other []uint64) bool

Equal returns true if slices are equal

func (SliceUint64) Filter

func (s SliceUint64) Filter(f func(el uint64) bool) []uint64

Filter returns slice of T for which F returned true

func (SliceUint64) Find

func (s SliceUint64) Find(f func(el uint64) bool) (uint64, error)

Find returns the first element for which f returns true

func (SliceUint64) FindIndex

func (s SliceUint64) FindIndex(f func(el uint64) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceUint64) GroupByBool

func (s SliceUint64) GroupByBool(f func(el uint64) bool) map[bool][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByByte

func (s SliceUint64) GroupByByte(f func(el uint64) byte) map[byte][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByError

func (s SliceUint64) GroupByError(f func(el uint64) error) map[error][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByFloat32

func (s SliceUint64) GroupByFloat32(f func(el uint64) float32) map[float32][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByFloat64

func (s SliceUint64) GroupByFloat64(f func(el uint64) float64) map[float64][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByInt

func (s SliceUint64) GroupByInt(f func(el uint64) int) map[int][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByInt16

func (s SliceUint64) GroupByInt16(f func(el uint64) int16) map[int16][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByInt32

func (s SliceUint64) GroupByInt32(f func(el uint64) int32) map[int32][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByInt64

func (s SliceUint64) GroupByInt64(f func(el uint64) int64) map[int64][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByInt8

func (s SliceUint64) GroupByInt8(f func(el uint64) int8) map[int8][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByInterface

func (s SliceUint64) GroupByInterface(f func(el uint64) interface{}) map[interface{}][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByRune

func (s SliceUint64) GroupByRune(f func(el uint64) rune) map[rune][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByString

func (s SliceUint64) GroupByString(f func(el uint64) string) map[string][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByUint

func (s SliceUint64) GroupByUint(f func(el uint64) uint) map[uint][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByUint16

func (s SliceUint64) GroupByUint16(f func(el uint64) uint16) map[uint16][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByUint32

func (s SliceUint64) GroupByUint32(f func(el uint64) uint32) map[uint32][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByUint64

func (s SliceUint64) GroupByUint64(f func(el uint64) uint64) map[uint64][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) GroupByUint8

func (s SliceUint64) GroupByUint8(f func(el uint64) uint8) map[uint8][]uint64

GroupBy groups element from array by value returned by f

func (SliceUint64) InsertAt

func (s SliceUint64) InsertAt(index int, element uint64) ([]uint64, error)

InsertAt returns the slice with element inserted at given index.

func (SliceUint64) Intersperse

func (s SliceUint64) Intersperse(el uint64) []uint64

Intersperse inserts el between each element of arr

func (SliceUint64) Join

func (s SliceUint64) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceUint64) Last

func (s SliceUint64) Last() (uint64, error)

Last returns the last element from the slice

func (SliceUint64) MapBool

func (s SliceUint64) MapBool(f func(el uint64) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapByte

func (s SliceUint64) MapByte(f func(el uint64) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapError

func (s SliceUint64) MapError(f func(el uint64) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapFloat32

func (s SliceUint64) MapFloat32(f func(el uint64) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapFloat64

func (s SliceUint64) MapFloat64(f func(el uint64) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapInt

func (s SliceUint64) MapInt(f func(el uint64) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapInt16

func (s SliceUint64) MapInt16(f func(el uint64) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapInt32

func (s SliceUint64) MapInt32(f func(el uint64) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapInt64

func (s SliceUint64) MapInt64(f func(el uint64) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapInt8

func (s SliceUint64) MapInt8(f func(el uint64) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapInterface

func (s SliceUint64) MapInterface(f func(el uint64) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapRune

func (s SliceUint64) MapRune(f func(el uint64) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapString

func (s SliceUint64) MapString(f func(el uint64) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapUint

func (s SliceUint64) MapUint(f func(el uint64) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapUint16

func (s SliceUint64) MapUint16(f func(el uint64) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapUint32

func (s SliceUint64) MapUint32(f func(el uint64) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapUint64

func (s SliceUint64) MapUint64(f func(el uint64) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) MapUint8

func (s SliceUint64) MapUint8(f func(el uint64) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint64) Max

func (s SliceUint64) Max() (uint64, error)

Max returns the maximal element from arr

func (SliceUint64) Min

func (s SliceUint64) Min() (uint64, error)

Min returns the minimal element from arr

func (SliceUint64) Permutations

func (s SliceUint64) Permutations(size int) chan []uint64

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceUint64) Product

func (s SliceUint64) Product(repeat int) chan []uint64

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceUint64) ReduceBool

func (s SliceUint64) ReduceBool(acc bool, f func(el uint64, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceByte

func (s SliceUint64) ReduceByte(acc byte, f func(el uint64, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceError

func (s SliceUint64) ReduceError(acc error, f func(el uint64, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceFloat32

func (s SliceUint64) ReduceFloat32(acc float32, f func(el uint64, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceFloat64

func (s SliceUint64) ReduceFloat64(acc float64, f func(el uint64, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceInt

func (s SliceUint64) ReduceInt(acc int, f func(el uint64, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceInt16

func (s SliceUint64) ReduceInt16(acc int16, f func(el uint64, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceInt32

func (s SliceUint64) ReduceInt32(acc int32, f func(el uint64, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceInt64

func (s SliceUint64) ReduceInt64(acc int64, f func(el uint64, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceInt8

func (s SliceUint64) ReduceInt8(acc int8, f func(el uint64, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceInterface

func (s SliceUint64) ReduceInterface(acc interface{}, f func(el uint64, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceRune

func (s SliceUint64) ReduceRune(acc rune, f func(el uint64, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceString

func (s SliceUint64) ReduceString(acc string, f func(el uint64, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceUint

func (s SliceUint64) ReduceUint(acc uint, f func(el uint64, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceUint16

func (s SliceUint64) ReduceUint16(acc uint16, f func(el uint64, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceUint32

func (s SliceUint64) ReduceUint32(acc uint32, f func(el uint64, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceUint64

func (s SliceUint64) ReduceUint64(acc uint64, f func(el uint64, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceUint8

func (s SliceUint64) ReduceUint8(acc uint8, f func(el uint64, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint64) ReduceWhileBool

func (s SliceUint64) ReduceWhileBool(acc bool, f func(el uint64, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileByte

func (s SliceUint64) ReduceWhileByte(acc byte, f func(el uint64, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileError

func (s SliceUint64) ReduceWhileError(acc error, f func(el uint64, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileFloat32

func (s SliceUint64) ReduceWhileFloat32(acc float32, f func(el uint64, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileFloat64

func (s SliceUint64) ReduceWhileFloat64(acc float64, f func(el uint64, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileInt

func (s SliceUint64) ReduceWhileInt(acc int, f func(el uint64, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileInt16

func (s SliceUint64) ReduceWhileInt16(acc int16, f func(el uint64, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileInt32

func (s SliceUint64) ReduceWhileInt32(acc int32, f func(el uint64, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileInt64

func (s SliceUint64) ReduceWhileInt64(acc int64, f func(el uint64, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileInt8

func (s SliceUint64) ReduceWhileInt8(acc int8, f func(el uint64, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileInterface

func (s SliceUint64) ReduceWhileInterface(acc interface{}, f func(el uint64, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileRune

func (s SliceUint64) ReduceWhileRune(acc rune, f func(el uint64, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileString

func (s SliceUint64) ReduceWhileString(acc string, f func(el uint64, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileUint

func (s SliceUint64) ReduceWhileUint(acc uint, f func(el uint64, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileUint16

func (s SliceUint64) ReduceWhileUint16(acc uint16, f func(el uint64, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileUint32

func (s SliceUint64) ReduceWhileUint32(acc uint32, f func(el uint64, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileUint64

func (s SliceUint64) ReduceWhileUint64(acc uint64, f func(el uint64, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) ReduceWhileUint8

func (s SliceUint64) ReduceWhileUint8(acc uint8, f func(el uint64, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint64) Reverse

func (s SliceUint64) Reverse() []uint64

Reverse returns given arr in reversed order

func (SliceUint64) Same

func (s SliceUint64) Same() bool

Same returns true if all element in arr the same

func (SliceUint64) ScanBool

func (s SliceUint64) ScanBool(acc bool, f func(el uint64, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanByte

func (s SliceUint64) ScanByte(acc byte, f func(el uint64, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanError

func (s SliceUint64) ScanError(acc error, f func(el uint64, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanFloat32

func (s SliceUint64) ScanFloat32(acc float32, f func(el uint64, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanFloat64

func (s SliceUint64) ScanFloat64(acc float64, f func(el uint64, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanInt

func (s SliceUint64) ScanInt(acc int, f func(el uint64, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanInt16

func (s SliceUint64) ScanInt16(acc int16, f func(el uint64, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanInt32

func (s SliceUint64) ScanInt32(acc int32, f func(el uint64, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanInt64

func (s SliceUint64) ScanInt64(acc int64, f func(el uint64, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanInt8

func (s SliceUint64) ScanInt8(acc int8, f func(el uint64, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanInterface

func (s SliceUint64) ScanInterface(acc interface{}, f func(el uint64, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanRune

func (s SliceUint64) ScanRune(acc rune, f func(el uint64, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanString

func (s SliceUint64) ScanString(acc string, f func(el uint64, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanUint

func (s SliceUint64) ScanUint(acc uint, f func(el uint64, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanUint16

func (s SliceUint64) ScanUint16(acc uint16, f func(el uint64, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanUint32

func (s SliceUint64) ScanUint32(acc uint32, f func(el uint64, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanUint64

func (s SliceUint64) ScanUint64(acc uint64, f func(el uint64, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceUint64) ScanUint8

func (s SliceUint64) ScanUint8(acc uint8, f func(el uint64, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceUint64) Shuffle

func (s SliceUint64) Shuffle(seed int64) []uint64

Shuffle in random order arr elements

func (SliceUint64) Sort

func (s SliceUint64) Sort() []uint64

Sort returns sorted slice

func (SliceUint64) Sorted

func (s SliceUint64) Sorted() bool

Sorted returns true if slice is sorted

func (SliceUint64) Split

func (s SliceUint64) Split(sep uint64) [][]uint64

Split splits arr by sep

func (SliceUint64) StartsWith

func (s SliceUint64) StartsWith(prefix []uint64) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceUint64) Sum

func (s SliceUint64) Sum() uint64

Sum return sum of all elements from arr

func (SliceUint64) TakeEvery

func (s SliceUint64) TakeEvery(nth int, from int) ([]uint64, error)

TakeEvery returns slice of every nth elements

func (SliceUint64) TakeRandom

func (s SliceUint64) TakeRandom(count int, seed int64) ([]uint64, error)

TakeRandom returns slice of count random elements from the slice

func (SliceUint64) TakeWhile

func (s SliceUint64) TakeWhile(f func(el uint64) bool) []uint64

TakeWhile takes elements from arr while f returns true

func (SliceUint64) ToChannel

func (s SliceUint64) ToChannel() chan uint64

ToChannel returns channel with elements from the slice

func (SliceUint64) Uniq

func (s SliceUint64) Uniq() []uint64

Uniq returns arr with only first occurences of every element.

func (SliceUint64) Window

func (s SliceUint64) Window(size int) ([][]uint64, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceUint64) Without

func (s SliceUint64) Without(elements ...uint64) []uint64

Without returns the slice with filtered out element

type SliceUint8

type SliceUint8 struct {
	Data []uint8
}

Slice is a set of operations to work with slice

func (SliceUint8) All

func (s SliceUint8) All(f func(el uint8) bool) bool

All returns true if f returns true for all elements in arr

func (SliceUint8) Any

func (s SliceUint8) Any(f func(el uint8) bool) bool

Any returns true if f returns true for any element in arr

func (SliceUint8) Choice

func (s SliceUint8) Choice(seed int64) (uint8, error)

Choice chooses a random element from the slice. If seed is zero, UNIX timestamp will be used.

func (SliceUint8) ChunkByBool

func (s SliceUint8) ChunkByBool(f func(el uint8) bool) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByByte

func (s SliceUint8) ChunkByByte(f func(el uint8) byte) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByError

func (s SliceUint8) ChunkByError(f func(el uint8) error) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByFloat32

func (s SliceUint8) ChunkByFloat32(f func(el uint8) float32) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByFloat64

func (s SliceUint8) ChunkByFloat64(f func(el uint8) float64) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByInt

func (s SliceUint8) ChunkByInt(f func(el uint8) int) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByInt16

func (s SliceUint8) ChunkByInt16(f func(el uint8) int16) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByInt32

func (s SliceUint8) ChunkByInt32(f func(el uint8) int32) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByInt64

func (s SliceUint8) ChunkByInt64(f func(el uint8) int64) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByInt8

func (s SliceUint8) ChunkByInt8(f func(el uint8) int8) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByInterface

func (s SliceUint8) ChunkByInterface(f func(el uint8) interface{}) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByRune

func (s SliceUint8) ChunkByRune(f func(el uint8) rune) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByString

func (s SliceUint8) ChunkByString(f func(el uint8) string) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByUint

func (s SliceUint8) ChunkByUint(f func(el uint8) uint) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByUint16

func (s SliceUint8) ChunkByUint16(f func(el uint8) uint16) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByUint32

func (s SliceUint8) ChunkByUint32(f func(el uint8) uint32) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByUint64

func (s SliceUint8) ChunkByUint64(f func(el uint8) uint64) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkByUint8

func (s SliceUint8) ChunkByUint8(f func(el uint8) uint8) [][]uint8

ChunkBy splits arr on every element for which f returns a new value.

func (SliceUint8) ChunkEvery

func (s SliceUint8) ChunkEvery(count int) ([][]uint8, error)

ChunkEvery returns slice of slices containing count elements each

func (SliceUint8) Contains

func (s SliceUint8) Contains(el uint8) bool

Contains returns true if el in arr.

func (SliceUint8) Count

func (s SliceUint8) Count(el uint8) int

Count return count of el occurences in arr.

func (SliceUint8) CountBy

func (s SliceUint8) CountBy(f func(el uint8) bool) int

CountBy returns how many times f returns true.

func (SliceUint8) Cycle

func (s SliceUint8) Cycle() chan uint8

Cycle is an infinite loop over slice

func (SliceUint8) Dedup

func (s SliceUint8) Dedup() []uint8

Dedup returns a given slice without consecutive duplicated elements

func (SliceUint8) DedupByBool

func (s SliceUint8) DedupByBool(f func(el uint8) bool) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByByte

func (s SliceUint8) DedupByByte(f func(el uint8) byte) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByError

func (s SliceUint8) DedupByError(f func(el uint8) error) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByFloat32

func (s SliceUint8) DedupByFloat32(f func(el uint8) float32) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByFloat64

func (s SliceUint8) DedupByFloat64(f func(el uint8) float64) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByInt

func (s SliceUint8) DedupByInt(f func(el uint8) int) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByInt16

func (s SliceUint8) DedupByInt16(f func(el uint8) int16) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByInt32

func (s SliceUint8) DedupByInt32(f func(el uint8) int32) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByInt64

func (s SliceUint8) DedupByInt64(f func(el uint8) int64) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByInt8

func (s SliceUint8) DedupByInt8(f func(el uint8) int8) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByInterface

func (s SliceUint8) DedupByInterface(f func(el uint8) interface{}) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByRune

func (s SliceUint8) DedupByRune(f func(el uint8) rune) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByString

func (s SliceUint8) DedupByString(f func(el uint8) string) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByUint

func (s SliceUint8) DedupByUint(f func(el uint8) uint) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByUint16

func (s SliceUint8) DedupByUint16(f func(el uint8) uint16) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByUint32

func (s SliceUint8) DedupByUint32(f func(el uint8) uint32) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByUint64

func (s SliceUint8) DedupByUint64(f func(el uint8) uint64) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) DedupByUint8

func (s SliceUint8) DedupByUint8(f func(el uint8) uint8) []uint8

DedupBy returns a given slice without consecutive elements For which f returns the same result

func (SliceUint8) Delete

func (s SliceUint8) Delete(element uint8) []uint8

Delete deletes the first occurence of the element from the slice

func (SliceUint8) DeleteAll

func (s SliceUint8) DeleteAll(element uint8) []uint8

DeleteAll deletes all occurences of the element from the slice

func (SliceUint8) DeleteAt

func (s SliceUint8) DeleteAt(indices ...int) ([]uint8, error)

DeleteAt returns the slice without elements on given positions

func (SliceUint8) DropEvery

func (s SliceUint8) DropEvery(nth int, from int) ([]uint8, error)

DropEvery returns a slice of every nth element in the enumerable dropped, starting with the first element.

func (SliceUint8) DropWhile

func (s SliceUint8) DropWhile(f func(el uint8) bool) []uint8

DropWhile drops elements from arr while f returns true

func (SliceUint8) Each

func (s SliceUint8) Each(f func(el uint8))

Each calls f for every element from arr

func (SliceUint8) EndsWith

func (s SliceUint8) EndsWith(suffix []uint8) bool

EndsWith returns true if slice ends with the given suffix slice. If suffix is empty, it returns true.

func (SliceUint8) Equal

func (s SliceUint8) Equal(other []uint8) bool

Equal returns true if slices are equal

func (SliceUint8) Filter

func (s SliceUint8) Filter(f func(el uint8) bool) []uint8

Filter returns slice of T for which F returned true

func (SliceUint8) Find

func (s SliceUint8) Find(f func(el uint8) bool) (uint8, error)

Find returns the first element for which f returns true

func (SliceUint8) FindIndex

func (s SliceUint8) FindIndex(f func(el uint8) bool) int

FindIndex is like Find, but return element index instead of element itself. Returns -1 if element not found

func (SliceUint8) GroupByBool

func (s SliceUint8) GroupByBool(f func(el uint8) bool) map[bool][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByByte

func (s SliceUint8) GroupByByte(f func(el uint8) byte) map[byte][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByError

func (s SliceUint8) GroupByError(f func(el uint8) error) map[error][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByFloat32

func (s SliceUint8) GroupByFloat32(f func(el uint8) float32) map[float32][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByFloat64

func (s SliceUint8) GroupByFloat64(f func(el uint8) float64) map[float64][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByInt

func (s SliceUint8) GroupByInt(f func(el uint8) int) map[int][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByInt16

func (s SliceUint8) GroupByInt16(f func(el uint8) int16) map[int16][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByInt32

func (s SliceUint8) GroupByInt32(f func(el uint8) int32) map[int32][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByInt64

func (s SliceUint8) GroupByInt64(f func(el uint8) int64) map[int64][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByInt8

func (s SliceUint8) GroupByInt8(f func(el uint8) int8) map[int8][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByInterface

func (s SliceUint8) GroupByInterface(f func(el uint8) interface{}) map[interface{}][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByRune

func (s SliceUint8) GroupByRune(f func(el uint8) rune) map[rune][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByString

func (s SliceUint8) GroupByString(f func(el uint8) string) map[string][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByUint

func (s SliceUint8) GroupByUint(f func(el uint8) uint) map[uint][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByUint16

func (s SliceUint8) GroupByUint16(f func(el uint8) uint16) map[uint16][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByUint32

func (s SliceUint8) GroupByUint32(f func(el uint8) uint32) map[uint32][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByUint64

func (s SliceUint8) GroupByUint64(f func(el uint8) uint64) map[uint64][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) GroupByUint8

func (s SliceUint8) GroupByUint8(f func(el uint8) uint8) map[uint8][]uint8

GroupBy groups element from array by value returned by f

func (SliceUint8) InsertAt

func (s SliceUint8) InsertAt(index int, element uint8) ([]uint8, error)

InsertAt returns the slice with element inserted at given index.

func (SliceUint8) Intersperse

func (s SliceUint8) Intersperse(el uint8) []uint8

Intersperse inserts el between each element of arr

func (SliceUint8) Join

func (s SliceUint8) Join(sep string) string

Join concatenates elements of the slice to create a single string.

func (SliceUint8) Last

func (s SliceUint8) Last() (uint8, error)

Last returns the last element from the slice

func (SliceUint8) MapBool

func (s SliceUint8) MapBool(f func(el uint8) bool) []bool

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapByte

func (s SliceUint8) MapByte(f func(el uint8) byte) []byte

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapError

func (s SliceUint8) MapError(f func(el uint8) error) []error

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapFloat32

func (s SliceUint8) MapFloat32(f func(el uint8) float32) []float32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapFloat64

func (s SliceUint8) MapFloat64(f func(el uint8) float64) []float64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapInt

func (s SliceUint8) MapInt(f func(el uint8) int) []int

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapInt16

func (s SliceUint8) MapInt16(f func(el uint8) int16) []int16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapInt32

func (s SliceUint8) MapInt32(f func(el uint8) int32) []int32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapInt64

func (s SliceUint8) MapInt64(f func(el uint8) int64) []int64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapInt8

func (s SliceUint8) MapInt8(f func(el uint8) int8) []int8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapInterface

func (s SliceUint8) MapInterface(f func(el uint8) interface{}) []interface{}

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapRune

func (s SliceUint8) MapRune(f func(el uint8) rune) []rune

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapString

func (s SliceUint8) MapString(f func(el uint8) string) []string

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapUint

func (s SliceUint8) MapUint(f func(el uint8) uint) []uint

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapUint16

func (s SliceUint8) MapUint16(f func(el uint8) uint16) []uint16

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapUint32

func (s SliceUint8) MapUint32(f func(el uint8) uint32) []uint32

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapUint64

func (s SliceUint8) MapUint64(f func(el uint8) uint64) []uint64

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) MapUint8

func (s SliceUint8) MapUint8(f func(el uint8) uint8) []uint8

Map applies F to all elements in slice of T and returns slice of results

func (SliceUint8) Max

func (s SliceUint8) Max() (uint8, error)

Max returns the maximal element from arr

func (SliceUint8) Min

func (s SliceUint8) Min() (uint8, error)

Min returns the minimal element from arr

func (SliceUint8) Permutations

func (s SliceUint8) Permutations(size int) chan []uint8

Permutations returns successive size-length permutations of elements from the slice. {1, 2, 3} -> {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}

func (SliceUint8) Product

func (s SliceUint8) Product(repeat int) chan []uint8

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SliceUint8) ReduceBool

func (s SliceUint8) ReduceBool(acc bool, f func(el uint8, acc bool) bool) bool

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceByte

func (s SliceUint8) ReduceByte(acc byte, f func(el uint8, acc byte) byte) byte

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceError

func (s SliceUint8) ReduceError(acc error, f func(el uint8, acc error) error) error

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceFloat32

func (s SliceUint8) ReduceFloat32(acc float32, f func(el uint8, acc float32) float32) float32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceFloat64

func (s SliceUint8) ReduceFloat64(acc float64, f func(el uint8, acc float64) float64) float64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceInt

func (s SliceUint8) ReduceInt(acc int, f func(el uint8, acc int) int) int

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceInt16

func (s SliceUint8) ReduceInt16(acc int16, f func(el uint8, acc int16) int16) int16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceInt32

func (s SliceUint8) ReduceInt32(acc int32, f func(el uint8, acc int32) int32) int32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceInt64

func (s SliceUint8) ReduceInt64(acc int64, f func(el uint8, acc int64) int64) int64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceInt8

func (s SliceUint8) ReduceInt8(acc int8, f func(el uint8, acc int8) int8) int8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceInterface

func (s SliceUint8) ReduceInterface(acc interface{}, f func(el uint8, acc interface{}) interface{}) interface{}

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceRune

func (s SliceUint8) ReduceRune(acc rune, f func(el uint8, acc rune) rune) rune

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceString

func (s SliceUint8) ReduceString(acc string, f func(el uint8, acc string) string) string

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceUint

func (s SliceUint8) ReduceUint(acc uint, f func(el uint8, acc uint) uint) uint

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceUint16

func (s SliceUint8) ReduceUint16(acc uint16, f func(el uint8, acc uint16) uint16) uint16

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceUint32

func (s SliceUint8) ReduceUint32(acc uint32, f func(el uint8, acc uint32) uint32) uint32

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceUint64

func (s SliceUint8) ReduceUint64(acc uint64, f func(el uint8, acc uint64) uint64) uint64

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceUint8

func (s SliceUint8) ReduceUint8(acc uint8, f func(el uint8, acc uint8) uint8) uint8

Reduce applies F to acc and every element in slice of T and returns acc

func (SliceUint8) ReduceWhileBool

func (s SliceUint8) ReduceWhileBool(acc bool, f func(el uint8, acc bool) (bool, error)) (bool, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileByte

func (s SliceUint8) ReduceWhileByte(acc byte, f func(el uint8, acc byte) (byte, error)) (byte, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileError

func (s SliceUint8) ReduceWhileError(acc error, f func(el uint8, acc error) (error, error)) (error, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileFloat32

func (s SliceUint8) ReduceWhileFloat32(acc float32, f func(el uint8, acc float32) (float32, error)) (float32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileFloat64

func (s SliceUint8) ReduceWhileFloat64(acc float64, f func(el uint8, acc float64) (float64, error)) (float64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileInt

func (s SliceUint8) ReduceWhileInt(acc int, f func(el uint8, acc int) (int, error)) (int, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileInt16

func (s SliceUint8) ReduceWhileInt16(acc int16, f func(el uint8, acc int16) (int16, error)) (int16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileInt32

func (s SliceUint8) ReduceWhileInt32(acc int32, f func(el uint8, acc int32) (int32, error)) (int32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileInt64

func (s SliceUint8) ReduceWhileInt64(acc int64, f func(el uint8, acc int64) (int64, error)) (int64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileInt8

func (s SliceUint8) ReduceWhileInt8(acc int8, f func(el uint8, acc int8) (int8, error)) (int8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileInterface

func (s SliceUint8) ReduceWhileInterface(acc interface{}, f func(el uint8, acc interface{}) (interface{}, error)) (interface{}, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileRune

func (s SliceUint8) ReduceWhileRune(acc rune, f func(el uint8, acc rune) (rune, error)) (rune, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileString

func (s SliceUint8) ReduceWhileString(acc string, f func(el uint8, acc string) (string, error)) (string, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileUint

func (s SliceUint8) ReduceWhileUint(acc uint, f func(el uint8, acc uint) (uint, error)) (uint, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileUint16

func (s SliceUint8) ReduceWhileUint16(acc uint16, f func(el uint8, acc uint16) (uint16, error)) (uint16, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileUint32

func (s SliceUint8) ReduceWhileUint32(acc uint32, f func(el uint8, acc uint32) (uint32, error)) (uint32, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileUint64

func (s SliceUint8) ReduceWhileUint64(acc uint64, f func(el uint8, acc uint64) (uint64, error)) (uint64, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) ReduceWhileUint8

func (s SliceUint8) ReduceWhileUint8(acc uint8, f func(el uint8, acc uint8) (uint8, error)) (uint8, error)

ReduceWhile is like Reduce, but stops when f returns error

func (SliceUint8) Reverse

func (s SliceUint8) Reverse() []uint8

Reverse returns given arr in reversed order

func (SliceUint8) Same

func (s SliceUint8) Same() bool

Same returns true if all element in arr the same

func (SliceUint8) ScanBool

func (s SliceUint8) ScanBool(acc bool, f func(el uint8, acc bool) bool) []bool

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanByte

func (s SliceUint8) ScanByte(acc byte, f func(el uint8, acc byte) byte) []byte

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanError

func (s SliceUint8) ScanError(acc error, f func(el uint8, acc error) error) []error

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanFloat32

func (s SliceUint8) ScanFloat32(acc float32, f func(el uint8, acc float32) float32) []float32

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanFloat64

func (s SliceUint8) ScanFloat64(acc float64, f func(el uint8, acc float64) float64) []float64

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanInt

func (s SliceUint8) ScanInt(acc int, f func(el uint8, acc int) int) []int

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanInt16

func (s SliceUint8) ScanInt16(acc int16, f func(el uint8, acc int16) int16) []int16

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanInt32

func (s SliceUint8) ScanInt32(acc int32, f func(el uint8, acc int32) int32) []int32

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanInt64

func (s SliceUint8) ScanInt64(acc int64, f func(el uint8, acc int64) int64) []int64

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanInt8

func (s SliceUint8) ScanInt8(acc int8, f func(el uint8, acc int8) int8) []int8

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanInterface

func (s SliceUint8) ScanInterface(acc interface{}, f func(el uint8, acc interface{}) interface{}) []interface{}

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanRune

func (s SliceUint8) ScanRune(acc rune, f func(el uint8, acc rune) rune) []rune

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanString

func (s SliceUint8) ScanString(acc string, f func(el uint8, acc string) string) []string

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanUint

func (s SliceUint8) ScanUint(acc uint, f func(el uint8, acc uint) uint) []uint

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanUint16

func (s SliceUint8) ScanUint16(acc uint16, f func(el uint8, acc uint16) uint16) []uint16

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanUint32

func (s SliceUint8) ScanUint32(acc uint32, f func(el uint8, acc uint32) uint32) []uint32

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanUint64

func (s SliceUint8) ScanUint64(acc uint64, f func(el uint8, acc uint64) uint64) []uint64

Scan is like Reduce, but returns slice of f results

func (SliceUint8) ScanUint8

func (s SliceUint8) ScanUint8(acc uint8, f func(el uint8, acc uint8) uint8) []uint8

Scan is like Reduce, but returns slice of f results

func (SliceUint8) Shuffle

func (s SliceUint8) Shuffle(seed int64) []uint8

Shuffle in random order arr elements

func (SliceUint8) Sort

func (s SliceUint8) Sort() []uint8

Sort returns sorted slice

func (SliceUint8) Sorted

func (s SliceUint8) Sorted() bool

Sorted returns true if slice is sorted

func (SliceUint8) Split

func (s SliceUint8) Split(sep uint8) [][]uint8

Split splits arr by sep

func (SliceUint8) StartsWith

func (s SliceUint8) StartsWith(prefix []uint8) bool

StartsWith returns true if slice starts with the given prefix slice. If prefix is empty, it returns true.

func (SliceUint8) Sum

func (s SliceUint8) Sum() uint8

Sum return sum of all elements from arr

func (SliceUint8) TakeEvery

func (s SliceUint8) TakeEvery(nth int, from int) ([]uint8, error)

TakeEvery returns slice of every nth elements

func (SliceUint8) TakeRandom

func (s SliceUint8) TakeRandom(count int, seed int64) ([]uint8, error)

TakeRandom returns slice of count random elements from the slice

func (SliceUint8) TakeWhile

func (s SliceUint8) TakeWhile(f func(el uint8) bool) []uint8

TakeWhile takes elements from arr while f returns true

func (SliceUint8) ToChannel

func (s SliceUint8) ToChannel() chan uint8

ToChannel returns channel with elements from the slice

func (SliceUint8) Uniq

func (s SliceUint8) Uniq() []uint8

Uniq returns arr with only first occurences of every element.

func (SliceUint8) Window

func (s SliceUint8) Window(size int) ([][]uint8, error)

Window makes sliding window for a given slice: ({1,2,3}, 2) -> (1,2), (2,3)

func (SliceUint8) Without

func (s SliceUint8) Without(elements ...uint8) []uint8

Without returns the slice with filtered out element

type SlicesBool

type SlicesBool struct {
	Data [][]bool
}

Slices is a set of operations to work with slice of slices

func (SlicesBool) Concat

func (s SlicesBool) Concat() []bool

Concat concatenates given slices into a single slice.

func (SlicesBool) Product

func (s SlicesBool) Product() chan []bool

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesBool) Zip

func (s SlicesBool) Zip() chan []bool

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesByte

type SlicesByte struct {
	Data [][]byte
}

Slices is a set of operations to work with slice of slices

func (SlicesByte) Concat

func (s SlicesByte) Concat() []byte

Concat concatenates given slices into a single slice.

func (SlicesByte) Product

func (s SlicesByte) Product() chan []byte

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesByte) Zip

func (s SlicesByte) Zip() chan []byte

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesError

type SlicesError struct {
	Data [][]error
}

Slices is a set of operations to work with slice of slices

func (SlicesError) Concat

func (s SlicesError) Concat() []error

Concat concatenates given slices into a single slice.

func (SlicesError) Product

func (s SlicesError) Product() chan []error

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesError) Zip

func (s SlicesError) Zip() chan []error

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesFloat32

type SlicesFloat32 struct {
	Data [][]float32
}

Slices is a set of operations to work with slice of slices

func (SlicesFloat32) Concat

func (s SlicesFloat32) Concat() []float32

Concat concatenates given slices into a single slice.

func (SlicesFloat32) Product

func (s SlicesFloat32) Product() chan []float32

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesFloat32) Zip

func (s SlicesFloat32) Zip() chan []float32

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesFloat64

type SlicesFloat64 struct {
	Data [][]float64
}

Slices is a set of operations to work with slice of slices

func (SlicesFloat64) Concat

func (s SlicesFloat64) Concat() []float64

Concat concatenates given slices into a single slice.

func (SlicesFloat64) Product

func (s SlicesFloat64) Product() chan []float64

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesFloat64) Zip

func (s SlicesFloat64) Zip() chan []float64

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesInt

type SlicesInt struct {
	Data [][]int
}

Slices is a set of operations to work with slice of slices

func (SlicesInt) Concat

func (s SlicesInt) Concat() []int

Concat concatenates given slices into a single slice.

func (SlicesInt) Product

func (s SlicesInt) Product() chan []int

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesInt) Zip

func (s SlicesInt) Zip() chan []int

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesInt16

type SlicesInt16 struct {
	Data [][]int16
}

Slices is a set of operations to work with slice of slices

func (SlicesInt16) Concat

func (s SlicesInt16) Concat() []int16

Concat concatenates given slices into a single slice.

func (SlicesInt16) Product

func (s SlicesInt16) Product() chan []int16

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesInt16) Zip

func (s SlicesInt16) Zip() chan []int16

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesInt32

type SlicesInt32 struct {
	Data [][]int32
}

Slices is a set of operations to work with slice of slices

func (SlicesInt32) Concat

func (s SlicesInt32) Concat() []int32

Concat concatenates given slices into a single slice.

func (SlicesInt32) Product

func (s SlicesInt32) Product() chan []int32

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesInt32) Zip

func (s SlicesInt32) Zip() chan []int32

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesInt64

type SlicesInt64 struct {
	Data [][]int64
}

Slices is a set of operations to work with slice of slices

func (SlicesInt64) Concat

func (s SlicesInt64) Concat() []int64

Concat concatenates given slices into a single slice.

func (SlicesInt64) Product

func (s SlicesInt64) Product() chan []int64

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesInt64) Zip

func (s SlicesInt64) Zip() chan []int64

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesInt8

type SlicesInt8 struct {
	Data [][]int8
}

Slices is a set of operations to work with slice of slices

func (SlicesInt8) Concat

func (s SlicesInt8) Concat() []int8

Concat concatenates given slices into a single slice.

func (SlicesInt8) Product

func (s SlicesInt8) Product() chan []int8

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesInt8) Zip

func (s SlicesInt8) Zip() chan []int8

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesInterface

type SlicesInterface struct {
	Data [][]interface{}
}

Slices is a set of operations to work with slice of slices

func (SlicesInterface) Concat

func (s SlicesInterface) Concat() []interface{}

Concat concatenates given slices into a single slice.

func (SlicesInterface) Product

func (s SlicesInterface) Product() chan []interface{}

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesInterface) Zip

func (s SlicesInterface) Zip() chan []interface{}

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesRune

type SlicesRune struct {
	Data [][]rune
}

Slices is a set of operations to work with slice of slices

func (SlicesRune) Concat

func (s SlicesRune) Concat() []rune

Concat concatenates given slices into a single slice.

func (SlicesRune) Product

func (s SlicesRune) Product() chan []rune

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesRune) Zip

func (s SlicesRune) Zip() chan []rune

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesString

type SlicesString struct {
	Data [][]string
}

Slices is a set of operations to work with slice of slices

func (SlicesString) Concat

func (s SlicesString) Concat() []string

Concat concatenates given slices into a single slice.

func (SlicesString) Product

func (s SlicesString) Product() chan []string

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesString) Zip

func (s SlicesString) Zip() chan []string

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesUint

type SlicesUint struct {
	Data [][]uint
}

Slices is a set of operations to work with slice of slices

func (SlicesUint) Concat

func (s SlicesUint) Concat() []uint

Concat concatenates given slices into a single slice.

func (SlicesUint) Product

func (s SlicesUint) Product() chan []uint

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesUint) Zip

func (s SlicesUint) Zip() chan []uint

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesUint16

type SlicesUint16 struct {
	Data [][]uint16
}

Slices is a set of operations to work with slice of slices

func (SlicesUint16) Concat

func (s SlicesUint16) Concat() []uint16

Concat concatenates given slices into a single slice.

func (SlicesUint16) Product

func (s SlicesUint16) Product() chan []uint16

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesUint16) Zip

func (s SlicesUint16) Zip() chan []uint16

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesUint32

type SlicesUint32 struct {
	Data [][]uint32
}

Slices is a set of operations to work with slice of slices

func (SlicesUint32) Concat

func (s SlicesUint32) Concat() []uint32

Concat concatenates given slices into a single slice.

func (SlicesUint32) Product

func (s SlicesUint32) Product() chan []uint32

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesUint32) Zip

func (s SlicesUint32) Zip() chan []uint32

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesUint64

type SlicesUint64 struct {
	Data [][]uint64
}

Slices is a set of operations to work with slice of slices

func (SlicesUint64) Concat

func (s SlicesUint64) Concat() []uint64

Concat concatenates given slices into a single slice.

func (SlicesUint64) Product

func (s SlicesUint64) Product() chan []uint64

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesUint64) Zip

func (s SlicesUint64) Zip() chan []uint64

Zip returns chan of arrays of elements from given arrs on the same position.

type SlicesUint8

type SlicesUint8 struct {
	Data [][]uint8
}

Slices is a set of operations to work with slice of slices

func (SlicesUint8) Concat

func (s SlicesUint8) Concat() []uint8

Concat concatenates given slices into a single slice.

func (SlicesUint8) Product

func (s SlicesUint8) Product() chan []uint8

Product returns cortesian product of elements {{1, 2}, {3, 4}} -> {1, 3}, {1, 4}, {2, 3}, {2, 4}

func (SlicesUint8) Zip

func (s SlicesUint8) Zip() chan []uint8

Zip returns chan of arrays of elements from given arrs on the same position.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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