- [Function]
(
subobjects
objects {keyword value}*)
Returns a list of subobjects from a list
or seq
of objects. Supports all the keyword parameters
of map-objects
except :slot
and :slot!
.
Examples:
Example 1. Using subobjects
.
;;; define some random midi events to demonstrate mapping (define midis (loop for i below 100 collect (new midi :time i :keynum (between 20 100) :amplitude (between .1 .9) :duration (pick .2 .4 .6 .8)))) ;;; return every other event between the 10th and 20th (subobjects midis :start 10 :end 20 :step 2) ;;; return only events with even keynumbers (subobjects midis :test (lambda (x) (even? (sv x :keynum))))
See also:
fold-objects
[Function]map-objects
[Function]sv
[Macro]