def subst( hash )
      subst_var0 = @index0.subst hash
      subst_var1 = @index1.subst hash
      subst_var2 = @index2.subst hash
      value = @value.subst( @index0 => subst_var0, @index1 => subst_var1,
                            @index2 => subst_var2 ).subst hash
      initial = @initial ? @initial.subst( hash ) : nil
      block = @block.subst hash
      Diagonal.new value, subst_var0, subst_var1, subst_var2, initial,
        block, @var1, @var2
    end
def subst( hash )
      subst_var0 = @index0.subst hash
      subst_var1 = @index1.subst hash
      subst_var2 = @index2.subst hash
      value = @value.subst( @index0 => subst_var0, @index1 => subst_var1,
                            @index2 => subst_var2 ).subst hash
      initial = @initial ? @initial.subst( hash ) : nil
      block = @block.subst hash
      Diagonal.new value, subst_var0, subst_var1, subst_var2, initial,
        block, @var1, @var2
    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