On Jul 17, 2011, at 8:12 PM, Michael Edgar wrote:

> # Returns the first-discovered elt for which the block yields true
> def bsearch_find(&blk)
>  binary_matches(&blk).each do |elt|
>    return elt if blk.call(elt)
>  end
> end


Whoops, this is silly. It should be as follows:

def bsearch_find(&blk)
  binary_matches(&blk).first
end

I rewrote the first two methods when I came up with the strawman =
binary_matches API, and forgot to rewrite the third.

Michael Edgar
adgar / carboni.ca
http://carboni.ca/=