3 ms·
May I suggest stealing some of core.typed's syntax for your docstrings, especially for polymorphic functions? It scales very well, from simple types like cloju
by ambrosebs 13y ago
May I suggest stealing some of core.typed's syntax for your docstrings, especially for polymorphic functions?
It scales very well, from simple types like clojure.core/symbol:
https://github.com/clojure/core.typed/blob/57da1175037dfd61c96c711165ea318db65f46c0/src/main/clojure/clojure/core/typed/base_env.clj#L884 https://github.com/clojure/core.typed/blob/57da1175037dfd61c...
to polymorphic types like clojure.core/repeat:
https://github.com/clojure/core.typed/blob/57da1175037dfd61c96c711165ea318db65f46c0/src/main/clojure/clojure/core/typed/base_env.clj#L939 https://github.com/clojure/core.typed/blob/57da1175037dfd61c...
to succinct representations of complicated polymorphic types like clojure.core/fnil
https://github.com/clojure/core.typed/blob/57da1175037dfd61c96c711165ea318db65f46c0/src/main/clojure/clojure/core/typed/base_env.clj#L761 https://github.com/clojure/core.typed/blob/57da1175037dfd61c...
and I'll spare you the really insane annotations.
Of course you can pick and choose what's to your liking.
Here's a brief tutorial on type syntax: https://github.com/clojure/core.typed/wiki/Types https://github.com/clojure/core.typed/wiki/Types