> Use it just like you use defstruct, e.g.: (defstruct* person :first-
> name :last-name :age), but it will also create a little type-checker
> function: is-person? Here are some tests to see how it works:

Note that your type checker will give false positives if you're  
intending to use accessors: an ordinary map with the same keys will  
match the predicate, but accessor calls will fail.

(I also have a defstruct*, but it defines accessors and a struct-map  
coercion, not a predicate :))

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to