Skip to content
Eugene Lazutkin edited this page May 9, 2026 · 6 revisions

This module defines the environment and variable-related objects. It is available like that:

import {any} from 'deep6/env.js';

The following objects are defined:

  • EnvLike — the method contract every environment implementation satisfies (TypeScript-only type).
  • Env — the default proto-chain implementation.
  • EnvMap — the Map-stack sibling implementation; lives in deep6/env-map.js.
  • 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 any EnvLike environment.
  • any (or _) — special object that matches anything.

Shared primitives (Unifier, Variable, _, any and their helpers) also live in deep6/env-shared.js. Both deep6/env.js and deep6/env-map.js re-export them, so existing import {…} from 'deep6/env.js' keeps working unchanged.

Clone this wiki locally