func (s SliceBool) DedupByRune(f func(el bool) rune) []bool {
	result := make([]bool, 0, len(s.Data))
	if len(s.Data) == 0 {
		return result
	}
	prev := f(s.Data[0])
	result = append(result, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			result = append(result, el)
			prev = curr
		}
	}
	return result
}
DedupBy returns a given slice without consecutive elements
For which f returns the same result
package genesis
import (
	"context"
	"errors"
	"fmt"
	"math/rand"
	"sort"
	"strings"
	"sync"
	"time")
var ErrNotFound = errors.New("given element is not found")
var ErrNegativeValue = errors.New("negative value passed")
var ErrNonPositiveValue = errors.New("value must be positive")
var ErrOutOfRange = errors.New("index is bigger than container size")
var ErrEmpty = errors.New("container is empty")
type SliceBool struct {
	Data []bool
}
type ChannelBool struct {
	Data chan bool
}
type SequenceBool struct {
	ctx context.Context
}
type PairBool struct {
}
type AsyncSliceBool struct {
	Data    []bool
	Workers int
}
type SlicesBool struct {
	Data [][]bool
}
func (s SliceBool) Any(f func(el bool) bool) bool {
	for _, el := range s.Data {
		if f(el) {
			return true
		}
	}
	return false
}
func (s SliceBool) All(f func(el bool) bool) bool {
	for _, el := range s.Data {
		if !f(el) {
			return false
		}
	}
	return true
}
func (s SliceBool) Choice(seed int64) (bool, error) {
	if len(s.Data) == 0 {
		var tmp bool
		return tmp, ErrEmpty
	}
	if seed == 0 {
		seed = time.Now().UnixNano()
	}
	rand.Seed(seed)
	i := rand.Intn(len(s.Data))
	return s.Data[i], nil
}
func (s SliceBool) ChunkByBool(f func(el bool) bool) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByByte(f func(el bool) byte) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByString(f func(el bool) string) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByRune(f func(el bool) rune) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByError(f func(el bool) error) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByFloat32(f func(el bool) float32) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByFloat64(f func(el bool) float64) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByInt(f func(el bool) int) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByInt8(f func(el bool) int8) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByInt16(f func(el bool) int16) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByInt32(f func(el bool) int32) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByInt64(f func(el bool) int64) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByUint(f func(el bool) uint) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByUint8(f func(el bool) uint8) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByUint16(f func(el bool) uint16) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByUint32(f func(el bool) uint32) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByUint64(f func(el bool) uint64) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkByInterface(f func(el bool) interface{}) [][]bool {
	chunks := make([][]bool, 0)
	if len(s.Data) == 0 {
		return chunks
	}
	chunk := make([]bool, 0)
	prev := f(s.Data[0])
	chunk = append(chunk, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0)
			prev = curr
		}
		chunk = append(chunk, el)
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks
}
func (s SliceBool) ChunkEvery(count int) ([][]bool, error) {
	chunks := make([][]bool, 0)
	if count <= 0 {
		return chunks, ErrNegativeValue
	}
	chunk := make([]bool, 0, count)
	for i, el := range s.Data {
		chunk = append(chunk, el)
		if (i+1)%count == 0 {
			chunks = append(chunks, chunk)
			chunk = make([]bool, 0, count)
		}
	}
	if len(chunk) > 0 {
		chunks = append(chunks, chunk)
	}
	return chunks, nil
}
func (s SliceBool) Contains(el bool) bool {
	for _, val := range s.Data {
		if val == el {
			return true
		}
	}
	return false
}
func (s SliceBool) Count(el bool) int {
	count := 0
	for _, val := range s.Data {
		if val == el {
			count++
		}
	}
	return count
}
func (s SliceBool) CountBy(f func(el bool) bool) int {
	count := 0
	for _, el := range s.Data {
		if f(el) {
			count++
		}
	}
	return count
}
func (s SliceBool) Cycle() chan bool {
	c := make(chan bool, 1)
	go func() {
		defer close(c)
		if len(s.Data) == 0 {
			return
		}
		for {
			for _, val := range s.Data {
				c <- val
			}
		}
	}()
	return c
}
func (s SliceBool) Dedup() []bool {
	if len(s.Data) == 0 {
		return s.Data
	}
	result := make([]bool, 0, len(s.Data))
	prev := s.Data[0]
	result = append(result, prev)
	for _, el := range s.Data[1:] {
		if el != prev {
			result = append(result, el)
			prev = el
		}
	}
	return result
}
func (s SliceBool) DedupByBool(f func(el bool) bool) []bool {
	result := make([]bool, 0, len(s.Data))
	if len(s.Data) == 0 {
		return result
	}
	prev := f(s.Data[0])
	result = append(result, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			result = append(result, el)
			prev = curr
		}
	}
	return result
}
func (s SliceBool) DedupByByte(f func(el bool) byte) []bool {
	result := make([]bool, 0, len(s.Data))
	if len(s.Data) == 0 {
		return result
	}
	prev := f(s.Data[0])
	result = append(result, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			result = append(result, el)
			prev = curr
		}
	}
	return result
}
func (s SliceBool) DedupByString(f func(el bool) string) []bool {
	result := make([]bool, 0, len(s.Data))
	if len(s.Data) == 0 {
		return result
	}
	prev := f(s.Data[0])
	result = append(result, s.Data[0])
	for _, el := range s.Data[1:] {
		curr := f(el)
		if curr != prev {
			result = append(result, el)
			prev = curr
		}
	}
	return result
}