fp

package
v0.0.0-...-3e4fb85 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterInPlace

func FilterInPlace[T any](slice []T, pred func(T) bool) []T

func Keys

func Keys[K comparable, V any](m map[K]V) []K

func Lock1

func Lock1[T any, U any](l Locker[T], f func(inner T) U) U

func Lock2

func Lock2[T any, U any, J any](l Locker[T], f func(inner T) (U, J)) (U, J)

func Map

func Map[T any, U any](slice []T, f func(t T) U) []U

func Values

func Values[K comparable, V any](m map[K]V) []V

Types

type Locker

type Locker[T any] struct {
	// contains filtered or unexported fields
}

func NewLocker

func NewLocker[T any](inner T) Locker[T]

func (Locker[T]) LockE

func (l Locker[T]) LockE(f func(inner T) error) error

func (Locker[T]) String

func (l Locker[T]) String() string

Jump to

Keyboard shortcuts

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