class Array

Public Instance Methods

tag!() { |e), e| ... } click to toggle source

Wraps all objects in self into ::Array::Tag instances using the provided block to extract a key

@return [self]

# File lib/andromeda/patch/array_bin_search.rb, line 45
def tag! ; map! { |e| Tag.new (yield e), e } end
untag!() click to toggle source

Untags Array::Tag instances, i.e. replaces them with their value

@return [self]

# File lib/andromeda/patch/array_bin_search.rb, line 51
def untag! ; map! { |e| e.untagged } end

Private Instance Methods