Registry / utility / elliotchance-pie-v2

elliotchance-pie-v2

JSON →
library2.9.1gogounverified

A utility library for Go slices with generic functions like map, filter, reduce.

go get github.com/elliotchance/pie/v2
INSTALL
IMPORT
SIG · ELLIOTCHANCE-PIE-V
E
elliotchance-pie-v2
utilitygov2.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pie
✓ github.com/elliotchance/pie/v2

Double each element in a slice using pie.Map.

package main import ( "fmt" "github.com/elliotchance/pie/v2" ) func main() { numbers := []int{1, 2, 3, 4, 5} doubled := pie.Map(numbers, func(n int) int { return n * 2 }) fmt.Println(doubled) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.9.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
elliotchance-pie-v2 — go get elliotchance-pie-v2 · libregistry