Created
January 29, 2018 16:06
-
-
Save krisleech/eee9653a49e43e36577a7b7ee71ff079 to your computer and use it in GitHub Desktop.
Clojure Typed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(t/ann stringy [t/Str -> t/Str])) | |
(defn stringy [a] (str a)) | |
(stringy 1) ;; => runtime type error | |
(defn stringy [a] (symbol a)) ;; => compile time error | |
(t/ann person '{:name t/Str}) | |
(def person { :name 1 }) ;; error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment