Skip to content

Functional operations on slices using Go 1.18 type parameters

License

Notifications You must be signed in to change notification settings

drykit-go/slices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slices

Slices provides functional operations on Go slices using Go 1.18 type parameters.

Get started

Prerequisites

  • Make sure your local go.mod declares go 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/slices

Available functions

  • Map
  • Filter
  • Reduce
  • Apply
  • ApplyUntil
  • KeysOf
  • ValuesOf

Examples

See unit tests for some usage examples.

About

Functional operations on slices using Go 1.18 type parameters

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published