collections

package
v0.0.0-...-23ffd15 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(arr interface{}, predicate interface{}) interface{}

*

Example:
	ForEach([]int{1, 2, 3, 4}, func(x int) { fmt.Println(x) })

func Find

func Find(arr interface{}, predicate interface{}) interface{}

*

Example:
	Find([]int{1, 2, 3, 4}, func(x int) bool { return x%2 == 0 })

func ForEach

func ForEach(arr interface{}, predicate interface{})

*

Example:
	Filter([]int{1, 2, 3, 4}, func(x int) bool { return x%2 == 0 })

func Map

func Map(arr interface{}, predicate interface{}) interface{}

*

Example:
	Map([]int{1, 2, 3, 4}, func(x int) int { return x * 2 })

Types

This section is empty.

Jump to

Keyboard shortcuts

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