map-subobjects

[Function]
  (`map-subobjects` function seq [`:recurse` bool] [`:key` fn] [`:test` fn] [`:type` class])

Maps function over the subobjects of seq. If recurse is true then mapping is recursively applied to all subcontainers of seq If test is supplied then only those objects for which test returns true are mapped. If type is supplied instead of test then only objects of that type are mapped. If key is supplied it is first applied to each mapped object and the results are passed to the test function. `map-subobjects` does not return a value.

    cm> ;;
    collect
    cm> keynums
    of
    cm> all
    midi
    cm> notes
    in
    cm> #&stuff.
    (let ((nums '()))
          (map-subobjects #'(lambda (x) (push x nums)) #&stuff
                          :key #'midi-keynum :type 'midi)
          (nreverse nums))
    cm>

#### See Also:

- `#&``` [Macro]
- `append-object``` [Function]
- `find-object``` [Function]
- `insert-object``` [Function]
- `list-named-objects``` [Function]
- `list-subobjects``` [Function]
- `map-subcontainers``` [Function]
- `object-name``` [Function]
- `object-time``` [Function]
- `remove-object``` [Function]
- `remove-subobjects``` [Function]
- `save-object``` [Function]
- `subcontainers``` [Function]
- `subobjects``` [Function]