Skip to content

Glossary: Software Design Patterns in Go

Function type

Also written: function types

A named type whose values are functions of a given shape, such as `type Discount func(subtotal float64) float64`. Any function of that shape can be stored in a field or passed around.

Where the book teaches it

Related terms

StrategyClosure