Single-method interfaces (SMI) in Go are a more general and powerful technique than HOFs. SMIs have proven to be a very successful software modeling tool for Go programmers, and you find them all over Go code-bases. The tree search example using SMIs is almost identical to the previous version.

2m read time From golang.ch
Post cover image

Sort: