recursiveFunc function
Declare a recursive function with the given name
, domain
, and range
.
The body of this function should be declared later using defineRecursiveFunc.
Implementation
RecursiveFunc recursiveFunc(
String name,
Iterable<Sort> domain,
Sort range,
Expr? body,
) {
final result = RecursiveFunc(Sym(name), domain.toList(), range);
if (body != null) {
defineRecursiveFunc(result, body);
}
return result.declare();
}