interpreters/let-proc-eff/let_refs_grammar.rb
# We use lazy enumerators to not evaluate all the expressions. There might be
# a type error along the way so evaluating all the expressions and then hitting a type
# error is wasted effort. Evaluate only when necessary and die as soon as we have a type error.
We use lazy enumerators to not evaluate all the expressions. There might be
a type error along the way so evaluating all the expressions and then hitting a type
error is wasted effort. Evaluate only when necessary and die as soon as we have a type error.
We use lazy enumerators to not evaluate all the expressions . There might be a type error along the way so evaluating all the expressions and then hitting a type error is wasted effort . Evaluate only when necessary and die as soon as we have a type error .
def eval(env, store, op)
      accumulator = self.expressions[0].eval(env, store)
      self.expressions.lazy.drop(1).each {|x| accumulator = accumulator.send(op, x.eval(env, store))}
      accumulator
    end
def eval ( env , store , op ) accumulator = self . expressions [ 0 ] . eval ( env , store ) self . expressions . lazy . drop ( 1 ) . each { | x | accumulator = accumulator . send ( op , x . eval ( env , store ) ) } accumulator end
We use lazy enumerators to not evaluate all the expressions.
We use lazy enumerators to not evaluate all the expressions .
env
<not_specific>
store
<not_specific>
op
<not_specific>