![]() | ![]() | ![]() | map-space-instances | ![]() |
|
| function space-instance-regexp | [Function] |
Purpose
Apply a function once to each
space instance that matches a path-expression pattern.
Package :gbbopen
Module :gbbopen-core
Arguments and values
| function | A function designator specifying a function object of one argument | |
| space-instance-regexp | A space-instance path regular expression specifying the space instances to be mapped over |
Description
The space-instance-regexp argument is either the symbol
t (indicating all space instances) or a list
representing a regular expression where the following reserved symbols
are interpreted as follows:
= | matches one occurrence in a space-instance path | ||
? | matches zero or one occurrence in a space-instance path | ||
+ | matches one or more occurrences in a space-instance path | ||
* | matches zero or more occurrences in a space-instance path | ||
^ | move to parent | ||
A space-instance-regexp value consisting of a list of space instances mapped over as supplied.
See also
do-space-instances
find-space-instances
Example
Remove all hyp unit instances from
space instances that are rooted at (bb):
(map-space-instances
#'(lambda (space-instance)
(map-instances-on-space-instances
#'(lambda (unit-instance)
(remove-instance-from-space-instance unit-instance space-instance))
'hyp
space-instance))
'(bb +))
The GBBopen Project
![]() | ![]() | ![]() | map-space-instances | ![]() |