-
-
Notifications
You must be signed in to change notification settings - Fork 0
env
Eugene Lazutkin edited this page Jul 13, 2026
·
7 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).
-
EnvMap — the Map-stack implementation, the default used by unify() when no environment is passed; lives in
deep6/env-map.js. - Env — the proto-chain sibling implementation.
-
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 any
EnvLikeenvironment.-
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.
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.
Core functions
Environments and variables
Unification
Traverse
Unifiers
Utilities