func (s AsyncSlice) Any(f func(el T) bool) bool {
	if len(s.Data) == 0 {
		return false
	}
	wg := sync.WaitGroup{}
	worker := func(jobs <-chan int, result chan<- bool, ctx context.Context) {
		defer wg.Done()
		for {
			select {
			case <-ctx.Done():
				return
			case index, ok := <-jobs:
				if !ok {
					return
				}
				if f(s.Data[index]) {
					result <- true
					return
				}
			}
		}
	}
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	workers := s.Workers
	if workers == 0 || workers > len(s.Data) {
		workers = len(s.Data)
	}
	jobs := make(chan int, len(s.Data))
	result := make(chan bool, workers)
	wg.Add(workers)
	for i := 0; i < workers; i++ {
		go worker(jobs, result, ctx)
	}
	go func() {
		wg.Wait()
		close(result)
	}()
	for i := 0; i < len(s.Data); i++ {
		jobs <- i
	}
	close(jobs)
	for range result {
		return true
	}
	return false
}
Any returns true if f returns true for any element from slice
package implementation
import (
	"context"
	"sync"
)
type AsyncSlice struct {
	Data    []T
	Workers int
}
func (s AsyncSlice) All(f func(el T) bool) bool {
	if len(s.Data) == 0 {
		return true
	}
	wg := sync.WaitGroup{}
	worker := func(jobs <-chan int, result chan<- bool, ctx context.Context) {
		defer wg.Done()
		for {
			select {
			case <-ctx.Done():
				return
			case index, ok := <-jobs:
				if !ok {
					return
				}
				if !f(s.Data[index]) {
					result <- false
					return
				}
			}
		}
	}
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	workers := s.Workers
	if workers == 0 || workers > len(s.Data) {
		workers = len(s.Data)
	}
	jobs := make(chan int, len(s.Data))
	result := make(chan bool, workers)
	wg.Add(workers)
	for i := 0; i < workers; i++ {
		go worker(jobs, result, ctx)
	}
	go func() {
		wg.Wait()
		close(result)
	}()
	for i := 0; i < len(s.Data); i++ {
		jobs <- i
	}
	close(jobs)
	for range result {
		return false
	}
	return true
}