Look for an expression that matches the predicate,
starting with the seed and applying the terms to one another.
A predicate returning 0 (or nothing) means "keep looking",
a positive number stands for "found",
and a negative means "discard this term from further applications".
The order of search is from shortest to longest expressions.
Param: seed
Param: options
Param: options.depth
maximum generation to search for
Param: options.tries
maximum number of tries before giving up
Param: options.infer
whether to call infer(), default true.
Param: options.maxArgs
arguments in infer()
Param: options.max
step limit in infer()
Param: options.noskip
prevents skipping equivalent terms. Always true if infer is false.
Param: retain
if true. also add the whole cache to returned value
Param: options.progress
Param: options.progressInterval
minimum number of tries between calls to options.progress, default 1000.
Look for an expression that matches the predicate, starting with the seed and applying the terms to one another.
Param: seed
Param: options
Param: options.depth
maximum generation to search for
Param: options.tries
maximum number of tries before giving up
Param: options.infer
whether to call infer(), default true.
Param: options.maxArgs
arguments in infer()
Param: options.max
step limit in infer()
Param: options.noskip
prevents skipping equivalent terms. Always true if infer is false.
Param: retain
if true. also add the whole cache to returned value
Param: options.progress
Param: options.progressInterval
minimum number of tries between calls to options.progress, default 1000.
Param: predicate
Returns