Quote:
Originally Posted by ownedbycats
EDIT: "Recursing" probably isn't the right word here. I was thinking more of something similiar to the the divide-and-conquer algorithm, where a task is split up into a bunch of smaller tasks and then combined back together.
|
The right word is "nesting", and as you discovered there isn't a problem with that.
Recursion means X uses itself to compute the answer; X calls X directly or indirectly. Recursion requires that X have a "termination condition"; a situation where X returns a value instead of calling X. This allows the call chain to undo and return a value. If there is no termination condition then X will call X forever, eventually running out of memory or some other resource. Saved searches do not have termination conditions so recursion is not allowed by the search parser.
This Wikipedia article discusses recursion both formally and informally.