Skip to content
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.
    • Variable — a class to create variable objects that can be used with Env.
    • 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().

Clone this wiki locally