No description
Find a file
2022-04-07 21:45:29 +03:00
each.go initial 2022-04-07 21:36:40 +03:00
each_test.go initial 2022-04-07 21:36:40 +03:00
example_each_test.go initial 2022-04-07 21:36:40 +03:00
example_map_test.go initial 2022-04-07 21:36:40 +03:00
filter.go initial 2022-04-07 21:36:40 +03:00
filter_test.go initial 2022-04-07 21:36:40 +03:00
go.mod initial 2022-04-07 21:36:40 +03:00
LICENSE Create LICENSE 2022-04-07 21:45:29 +03:00
map.go initial 2022-04-07 21:36:40 +03:00
map_test.go initial 2022-04-07 21:36:40 +03:00
Readme.md initial 2022-04-07 21:36:40 +03:00
reduce.go initial 2022-04-07 21:36:40 +03:00
reduce_test.go initial 2022-04-07 21:36:40 +03:00
stack.go initial 2022-04-07 21:36:40 +03:00
stack_test.go initial 2022-04-07 21:36:40 +03:00

Collection with generics

Go >= 1.18 required.

Installation

go get https://go.neonxp.dev/collection@latest

Methods

Method Description Example
Map Async map over slice example_map_test.go
MapSync Sync map over slice example_map_test.go
Each Async call cb over each element example_each_test.go
MapEach Sync call cb over each element example_each_test.go
Filter Returns filtered elements async TODO
FilterSync Returns filtered elements TODO
Reduce Produce one single result from a sequence of elements TODO