Interface EvalEnv

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default EvalEnv bind​(java.lang.String name, java.lang.Object value)
      Creates an environment that has the same content as this one, plus the binding (name, value).
      default MutableEvalEnv bindMutable​(java.lang.String name)
      Creates an evaluation environment that has the same content as this one, plus a mutable slot.
      java.lang.Object getOpt​(java.lang.String name)
      Returns the binding of name if bound, null if not.
      default java.util.Map<java.lang.String,​java.lang.Object> valueMap()
      Returns a map of the values and bindings.
      void visit​(java.util.function.BiConsumer<java.lang.String,​java.lang.Object> consumer)
      Visits every variable binding in this environment.
    • Method Detail

      • getOpt

        java.lang.Object getOpt​(java.lang.String name)
        Returns the binding of name if bound, null if not.
      • bind

        default EvalEnv bind​(java.lang.String name,
                             java.lang.Object value)
        Creates an environment that has the same content as this one, plus the binding (name, value).
      • bindMutable

        default MutableEvalEnv bindMutable​(java.lang.String name)
        Creates an evaluation environment that has the same content as this one, plus a mutable slot.
      • visit

        void visit​(java.util.function.BiConsumer<java.lang.String,​java.lang.Object> consumer)
        Visits every variable binding in this environment.

        Bindings that are obscured by more recent bindings of the same name are visited, but after the more obscuring bindings.

      • valueMap

        default java.util.Map<java.lang.String,​java.lang.Object> valueMap()
        Returns a map of the values and bindings.