lambda

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockSelect added in v1.2.0

func BlockSelect(stop chan int)

func If

func If[T any](condition bool, match, notMatch T) T

func IfFunc

func IfFunc[T any](condition bool, matchFunc func() T, notMatchFunc func() T) T

func IfFuncPair

func IfFuncPair[T1 any, T2 any](condition bool, matchFunc func() (T1, T2), notMatchFunc func() (T1, T2)) (T1, T2)

func Loop added in v1.2.0

func Loop(always bool, do func())

func LoopReturn added in v1.2.0

func LoopReturn[T any](always bool, do func() T) T
func LoopReturn[T any](always bool, do func() T) T {
	if always {
		for {
			do()
		}
	} else {
		return do()
	}
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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