snack

package
v0.0.0-...-9354101 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfThen

func IfThen[E any](condition bool, ifValue E, elseValue E) E
Example
fmt.Println(Max(8, 10))                 // 10
fmt.Println(Max("8", "10"))             // 8
fmt.Println(Min("8", "10"))             // 8
fmt.Println(IfThen(true, false, true))  // false
fmt.Println(IfThen(false, false, true)) // true
Output:

10
8
10
false
true

func Large

func Large[E constraints.Ordered](a, b E) bool

func Less

func Less[E constraints.Ordered](a, b E) bool

func Max

func Max[E constraints.Ordered](a, b E) E

func Min

func Min[E constraints.Ordered](a, b E) E

func Self

func Self[E any](e E) E

Types

This section is empty.

Jump to

Keyboard shortcuts

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