Hi Meikel,
This seems to work but returns nil and so you can't see that a new var
has been defined!
cluja.core=> (defcomponent maxent-person maxent)
nil
cluja.core=> maxent-person ;;was it defined?
#<NameFinderME opennlp.tools.namefind.NameFinderME@2019666a> ;;yes it was!
Jim
On 21/02/13 14:42, Meikel Brandmeyer (kotarak) wrote:
(defmacro defcomponent
[name co]
`(do
(def ~name ~co)
(set-validator! (var ~name) component?)))
Maybe like this? (Untested)
Kind regards
Meikel
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.