list

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

list

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("entity not found")
)

Functions

This section is empty.

Types

type List

type List[A any] []A

func NewList

func NewList[A any]() List[A]

func Select

func Select[A, B any](l List[A], mapper func(a A) B) List[B]

func (*List[A]) All

func (l *List[A]) All(predicate func(a A) bool) bool

func (*List[A]) Any

func (l *List[A]) Any(predicate func(a A) bool) bool

func (*List[A]) First

func (l *List[A]) First(predicate func(a A) bool) (A, error)

func (*List[A]) FirstOrDefault

func (l *List[A]) FirstOrDefault(predicate func(a A) bool) A

func (*List[A]) Where

func (l *List[A]) Where(predicate func(a A) bool) List[A]

Jump to

Keyboard shortcuts

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