collections

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any[T any](rows []T, f func(r T) bool) bool

func Filter

func Filter[T any](rows []T, f func(r T) bool) []T

func Map

func Map[T, M any](rows []T, f func(r T) M) []M

Types

type Collection

type Collection[T any] []T

func From

func From[T any](v ...T) Collection[T]

func (Collection[T]) Any

func (c Collection[T]) Any(f func(r T) bool) bool

func (Collection[T]) Filter

func (c Collection[T]) Filter(f func(r T) bool) Collection[T]

Jump to

Keyboard shortcuts

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