I've run into several situations where I want to query for objects that match values two or more slots. I currently do something like this:<br><br>(defclass my-class ()<br> ((a :accessor slot-a)<br> (b :accessor slot-b<br>
:index b))<br> (:documentation "my test class"))<br><br>(find-if (lambda (obj)<br> (equal (slot-a obj) val-a))<br> (elephant:get-instances-by-value 'my-class 'slot-b val-b))<br><br>
<br>Is this a reasonable way of finding an object of type 'my-class that matches on values val-a and val-b for slots a and b?<br><br>Yarek<br>