hoplon / demos

Example ClojureScript applications using hoplon
81 stars 27 forks source link

doc string in queries' vector? #28

Closed desirtech closed 5 years ago

desirtech commented 6 years ago

I noticed that although this code's demo does work, the 'queries' declaration has a docstring before the vector of words. However, 'def's only bind data to names. Functions allow for more options for abstractions... Is this a typo, or have you defined a newer (and frankly better) version of (def ~doc-string ~name) within Hoplon?

jjttjj commented 6 years ago

You can in fact use a docstring in a def in both clj and cljs.
http://cljs.github.io/api/cljs.core/#def