Skip to content

Glossary: Data Structures and Algorithms in Go

Comparable key

Also written: comparable, hashable keys, comparable keys

A type that `==` works on, so it can be a map key or set item: strings, numbers, booleans, arrays and structs of those. Slices, maps and functions are not comparable.

Where the book teaches it

Related terms

Hash mapSet