Skip to content

Glossary: Go Beyond the Basics

tilde (~)

Also written: ~int

In a constraint, `~int` means any type whose underlying type is `int`, which lets `Sum` accept `[]Cents`.

Where the book teaches it

Related terms

underlying typedefined typeconstraint