But a good rule-of-thumb is that these compile-time type errors are more of a courtesy, rather than a guarantee. As soon as you abstract over fn-t with another function, like so:
(defun g (x y)
(fn-t x y))
and proceed to use g in your code, all the static checking won't happen anymore, because as far as g is concerned, it can take any input argument types.
Comments
It can detect simple-ish instances, like calling
But a good rule-of-thumb is that these compile-time type errors are more of a courtesy, rather than a guarantee. As soon as you abstract over fn-t with another function, like so: and proceed to use g in your code, all the static checking won't happen anymore, because as far as g is concerned, it can take any input argument types. No compile-time warning is issued. Contrast with Coalton: