Racket's docs have some lovely examples of programming by contract: https://docs.racket-lang.org/guide/contracts-examples.html