The clipperhouse/gen tool

Though there are several generics code generation tools available, let's look at my personal favorite, clipperhouse/gen.

We get the following functions for free with the clipperhouse/gen tool:

Aggregation Filter Map Misc
Aggregate[T] All Select[T] List
Average Any Where Ring
Average[T] Distinct Set
Count DistinctBy stringer
Max First
Max[T] GroupBy[T]
MaxBy Shuffle
Min Sort
Min[T] SortBy
MinBy

gen is a code-generation tool for Go. It's intended to offer generics-like functionality for your types. Out of the box, it offers LINQ/underscore-inspired methods.

Get Learning Functional Programming in Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.