Here lies an experiment to see if it's possible to combine Malli schemas with Clojure protocols.
I want the ability to define somewhat typed interfaces in Clojure that don't suffer from bit-rot (which the
:malli/schema metadata annotation suffers from) and that don't require adopting a complete typed solution for Clojure.
I personally use Malli for validation/parsing which means my code is already thoroughly littered with Malli schemas. I do not want to adopt some other syntax or schema just for the sake of making typed interfaces.
The experimentational question is thus:
defprotocol macro which accepts Malli schemas as parameters, which;The answer? A resounding "yes"!
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |