Struct lamcal::environment::Environment[][src]

pub struct Environment { /* fields omitted */ }

The environment in which lambda terms get evaluated.

There are two possibilities to create an instance of Environment:

  • Environment::new() - creates an empty environment.
  • Environment::default() - creates an environment containing predefined bindings to all the builtin standard terms, combinators and data encoding terms.

Methods

impl Environment
[src]

Creates a new empty environment.

The empty environment does not contain any bindings at all. If you want to create an environment with predefined bindings to all the builtin standard terms, combinators and data encodings use the Environment::default() function.

Adds the given binding to this environment.

Adds a new binding of the given term to the given name to this environment.

Removes the binding to the given name from this environment and returns the bound term if such a binding previously existed.

Removes all bindings from this environment.

Returns an iterator over all bindings defined in this environment.

The iterator issues the items in an arbitrary order.

Returns an iterator over all bindings defined in this environment.

Looks up the binding for a name and returns a reference to the bound term if a binding exists for the given name.

Trait Implementations

impl Debug for Environment
[src]

Formats the value using the given formatter. Read more

impl Clone for Environment
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Environment
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl FromIterator<(VarName, Term)> for Environment
[src]

Creates a value from an iterator. Read more

impl FromIterator<Binding> for Environment
[src]

Creates a value from an iterator. Read more

impl Extend<(VarName, Term)> for Environment
[src]

Extends a collection with the contents of an iterator. Read more

impl Extend<Binding> for Environment
[src]

Extends a collection with the contents of an iterator. Read more

impl Default for Environment
[src]

Creates an Environment containing predefined bindings to all the standard terms, combinators and data encoding terms that are provided by this crate.

Auto Trait Implementations

impl Send for Environment

impl Sync for Environment