glenjamin/devboard

Body polymorphism (open edition)

glenjamin opened this issue · 2 comments

Provide an API that allows extending the list of supported types in #9

Perhaps using https://github.com/glenjamin/defmulti ?

The way clojurescript implements protocols is by using special method names.

We could do something similar, if you want your custom type to have a render implementation, you add a method called devcards$render onto it.

Changed my mind on this, its easier to just wrap unsupported values in a function which does the transformation.