SliceX
SliceX provides functional operations on Go slices using Go 1.18 type parameters.
Get started
Prerequisites
- Make sure your local
go.mod
declaresgo 1.18
- Go 1.18 not being relaesed yet, I suggest using the wrapper gotip:
The gotip command compiles and runs the go command from the development tree.
Installation
Assuming the above prerequisites are fulfilled:
gotip get github.com/drykit-go/slicex
Available functions
Map
Filter
Reduce
Apply
ApplyUntil
KeysOf
ValuesOf
Examples
See unit tests for some usage examples.