Name

recursive — Recursively apply a transform, and possibly a secondary transform

Synopsis

		recursive ( primary-transform )
		
		recursive ( primary-transform, secondary-transform )
		

Description

Sometimes you would like a transform to return an entire sub-tree of hierarchical data related to a program object. BBQ provides some special-purpose transforms (such as recursive derived classes) for this purpose; this transform operator lets you recursively apply an arbitrary transform. Use care when using this operator, since you might accidentally specify a recursion that does not end (i.e. recursive ( same )). To prevent a hang or crash, the operator will stop recursing at an arbitrary depth (50).

The effect of this transform operator can be most concisely described recursively:

  • The result of applying the first form of this transform to a set is the result of applying primary-transform to a set, combined with the result of applying this transform to that result.
  • The result of applying the second form of this transform to a set is the result of applying primary-transform to the set, combined with the result of applying this transform to the result of applying secondary-transform to the result of applying primary-transform to the set.

Example

To see the complete call tree starting with a particular method, use the transform:

recursive ( calls to, methods containing)

Applies to Type

primary-transform's Applies To type

Results in Type

primary-transform's Results type. If this is not the same as the primary-transform's Applies To type, a secondary-transform must be provided that applies to the Result type of primary-transform and results in its Applies To type.

browse-by-query home antlersoft free software sourceforge project page