fp

package
v0.0.0-...-5f1c9c6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply[A any, B any](in []A, fn func(A) B) []B

func ApplyM

func ApplyM[A any, B any, K comparable](in map[K]A, fn func(A) B) map[K]B

func Filter

func Filter[A any](in []A, fn func(A) bool) []A

func FilterM

func FilterM[A any, K comparable](in map[K]A, fn func(A) bool) map[K]A

func If

func If[T any](cond bool, a T, b T) T

func ToList

func ToList[A any, K comparable](in map[K]A) []A

func ToMap

func ToMap[A any, K comparable](in []A, fn func(A) K) map[K]A

Types

This section is empty.

Jump to

Keyboard shortcuts

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