moving from collect to each

when iterating over tree.
Much cleaner, less hokuspukus methods that are noops

Mom is coming back out, but not linked yet
This commit is contained in:
Torsten Ruger
2018-03-15 17:22:56 +05:30
parent 3702411043
commit 3247c2036c
10 changed files with 37 additions and 35 deletions

View File

@ -18,12 +18,16 @@ module Vool
@dynamic = nil
end
def collect(arr)
@receiver.collect(arr)
def normalize
SendStatement.new(@name, @receiver , @arguments)
end
def each(&block)
block.call(self)
block.call(@receiver)
@arguments.each do |arg|
arg.collect(arr)
block.call(arg)
end
super
end
# A Send breaks down to 2 steps: