#lang typed/racket
(struct pt ([x : Real] [y : Real]))
;; the form on the next line is a type annotation
(: distance (-> pt pt Real))
(define (distance p1 p2)
(sqrt (+ (sqr (- (pt-x p2) (pt-x p1)))
(sqr (- (pt-y p2) (pt-y p1))))))
(doc my-fn
``
Fabulous docstring that contains numerous examples.
Could even live elsewhere in the file.
``)
(defn my-fn
[x y]
(+ x y))