def subst( hash )
      # subst_var = @index.subst hash
      # Lambda.new subst_var, @term.subst( @index => subst_var ).subst( hash )
      subst_var = @index.subst hash
      Lambda.new subst_var, @term.subst( hash.merge( @index => subst_var ) )
    end
def subst( hash )
      # subst_var = @index.subst hash
      # Lambda.new subst_var, @term.subst( @index => subst_var ).subst( hash )
      subst_var = @index.subst hash
      Lambda.new subst_var, @term.subst( hash.merge( @index => subst_var ) )
    end
Substitute variables

 Substitute the variables with the values given in the hash.

 @param [Hash] hash Substitutions to apply.

 @return [Node] Term with substitutions applied.

 @private