# | collectFreeFunctionVars | Expr -> Set<Var> | |
# | collectFreeVars | Expr -> Set<Var> | |
# | collectFreeVarsWithPredicate(...) | predicate:(Var -> bool) -> expr:Expr -> Set<Var> | |
# | collectLambdaArguments(expr) | expr:Expr -> List<Var> | |
# | collectLocalVars(expr) | expr:Expr -> Var list | |
# | createDereferenceCall(reference) | reference:Expr -> Expr | |
# | createRefCall(value) | value:Expr -> Expr | |
# | createReferenceSetCall reference value | reference:Expr -> value:Expr -> Expr | |
| extractLambdaArguments(expr) | expr:Expr -> Var list * Expr | |
# | getFunctionArgTypes(funType) | funType:Type -> Type list | |
# | isFunction(var) | var:Var -> bool | |
# | isGlobal(var) | var:Var -> bool | |
# | isTypeOf(var) | var:Var -> bool | |
# | makeApplicationExpr head exprs | head:Expr -> exprs:Expr list -> Expr | |
# | makeFunctionType retType argTypes | retType:Type -> argTypes:List<Type> -> Type | |
# | makeLambdaExpr args body | args:Var list -> body:Expr -> Expr | |
# | makeLambdaType(types) | types:Type list -> Type | |
Collect free variables of expression that satisfies predicate.