Re: structmap instance test

2009-02-21 Thread David Nolen
For example, with Spinoza: (def my-circle (make-instance circle)) (instance-of? my-circle circle) ; > true circle is just a struct. On Sat, Feb 21, 2009 at 2:09 PM, David Nolen wrote: > This not hard to implement. This exactly what Spinoza does. Feel free to > lift any of my code. > > > On Sat

Re: structmap instance test

2009-02-21 Thread David Nolen
This not hard to implement. This exactly what Spinoza does. Feel free to lift any of my code. On Sat, Feb 21, 2009 at 9:08 AM, Mark Volkmann wrote: > > Is there a way to test whether a given object is an instance of a > given structmap? > For example, > > (defstruct dog-struct :name :breed) > > (

Re: structmap instance test

2009-02-21 Thread Jason Wolfe
I don't think so. See http://groups.google.com/group/clojure/browse_thread/thread/74d430f8e4353725/ab7fe2144e09b56a?hl=en&lnk=gst&q=instance+defstruct#ab7fe2144e09b56a (and other threads on this issue too, IIRC.) Cheers, Jason On Feb 21, 6:08 am, Mark Volkmann wrote: > Is there a way to test

structmap instance test

2009-02-21 Thread Mark Volkmann
Is there a way to test whether a given object is an instance of a given structmap? For example, (defstruct dog-struct :name :breed) (def my-dog (struct dog-struct "Dasher" "whippet")) (when (some-function my-dog dog-struct) (println "It's a dog!")) -- R. Mark Volkmann Object Computing, Inc.