W
Wesley Rishel
For a suitable value of pth, this works
require 'find'
Find.find (pth) { |x| puts x}
This doesn't
require 'find'
Find.find (pth) { |x| yield(x)}.max
giving the error no block given (LocalJumpError), which I interpret as
saying the yield doesn't know to yield to max.
I am clearly trying to mix metaphors here.
There are obviously a lot of ways to compute the highest sortable path;
I don't need to know that.
As a learning experience I am just trying to clarify my understanding of
Ruby.
It is possible that this is equivalent to asking if there is a way to
feed the output of an iterator into somthing that is looking for the the
each iterator of an enum.
require 'find'
Find.find (pth) { |x| puts x}
This doesn't
require 'find'
Find.find (pth) { |x| yield(x)}.max
giving the error no block given (LocalJumpError), which I interpret as
saying the yield doesn't know to yield to max.
I am clearly trying to mix metaphors here.
There are obviously a lot of ways to compute the highest sortable path;
I don't need to know that.
As a learning experience I am just trying to clarify my understanding of
Ruby.
It is possible that this is equivalent to asking if there is a way to
feed the output of an iterator into somthing that is looking for the the
each iterator of an enum.