-
-
Notifications
You must be signed in to change notification settings - Fork 0
unify
Eugene Lazutkin edited this page Jan 11, 2022
·
2 revisions
This module defines the unification function and related objects. It is available like that:
import unify from 'deep6/unify.js';
The following objects are exported:
- Properties defined in env, which are passed through for the convenience:
- Env — a class to create an environment object.
-
Unifier — an interface for custom unifiers.
-
isUnifier(x) — returns a truthy value for objects based on
Unifier
.
-
isUnifier(x) — returns a truthy value for objects based on
-
Variable — a class to create variable objects that can be used with
Env
.-
isVariable(x) — returns a truthy value for objects based on
Variable
. - variable([name]) — creates a variable object.
-
isVariable(x) — returns a truthy value for objects based on
- any (or _) — special object that matches anything.
-
open() — wraps an object to be treated as "open".
- isOpen() — checks, if an object is wrapped as "open".
-
soft() — wraps an object to be treated as "soft".
- isSoft() — checks, if an object is wrapped as "soft".
- isWrapped() — checks, if an object is wrapped.
The default export of the module is unify()
.