Skip to content

Glossary: Go Beyond the Basics

generics

Also written: generic function

Writing code once with a blank for the type, so one function or type works for many types, such as `Sum` for both `int` and `float64`.

Where the book teaches it

Related terms

type parameterconstrainttype inference