Lisp HUG Maillist Archive

Adding an "item" to a CAPI:COLLECTION or a CAPI:CHOICE

Hi

is it just me, or we are missing a way to programmatically "add an 
item" to a CAPI:COLLECTION and/or a CAPI:CHOICE?

Is the following the only proper way to do it?

(defmethod add (item (c capi:collection))
    (let ((nis  (map-into (make-sequence (type-of (capi:collection-items 
c))
                                                                      
(1+ (capi:count-collection-items c)))
                                      #'identity
                                      (capi:collection-items c))))
        (setf (capi:collection-items c) nis)))

Cheers


--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Updated at: 2020-12-10 08:59 UTC