first

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package first provides short aliases for loop functions for retrieving a first element

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Converted added in v0.0.8

func Converted[From, To any](next func() (From, bool), filter func(From) bool, converter func(From) To) (out To, ok bool)

Converted converts the first element that satisfies the condition of the 'predicate' function by the converter and returns it

func Of

func Of[T any](next func() (T, bool), predicate func(T) bool) (T, bool)

Of an alias of the loop.First

Types

This section is empty.

Jump to

Keyboard shortcuts

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