Skip to content

Glossary: Data Structures and Algorithms in Go

Function literal

Also written: anonymous function, function literals

A function with no name, written inline where it is needed, such as `func(a, b Order) int { ... }` passed to a sort.

Where the book teaches it

Related terms

Comparison functionslices.SortFunc