Sha256: 7ce52a261db9a490cfde364412373ac91344b6a79acd31b731bc42bed84f6c92

Contents?: true

Size: 218 Bytes

Versions: 21

Compression:

Stored size: 218 Bytes

Contents

module Skylight
  module AllocationFree
    def array_find(array)
      i = 0

      while i < array.size
        item = array[i]
        return item if yield item
        i += 1
      end

      nil
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
skylight-0.3.10 lib/skylight/util/allocation_free.rb
skylight-0.3.8 lib/skylight/util/allocation_free.rb
skylight-0.3.7 lib/skylight/util/allocation_free.rb
skylight-0.3.6 lib/skylight/util/allocation_free.rb
skylight-0.3.3 lib/skylight/util/allocation_free.rb
skylight-0.3.2 lib/skylight/util/allocation_free.rb
skylight-0.3.1 lib/skylight/util/allocation_free.rb
skylight-0.3.0 lib/skylight/util/allocation_free.rb
skylight-0.2.7 lib/skylight/util/allocation_free.rb
skylight-0.2.6 lib/skylight/util/allocation_free.rb
skylight-0.3.0.rc.6 lib/skylight/util/allocation_free.rb
skylight-0.2.5 lib/skylight/util/allocation_free.rb
skylight-0.2.4 lib/skylight/util/allocation_free.rb
skylight-0.3.0.rc.5 lib/skylight/util/allocation_free.rb
skylight-0.3.0.rc.4 lib/skylight/util/allocation_free.rb
skylight-0.3.0.rc.3 lib/skylight/util/allocation_free.rb
skylight-0.2.3 lib/skylight/util/allocation_free.rb
skylight-0.2.2 lib/skylight/util/allocation_free.rb
skylight-0.2.1 lib/skylight/util/allocation_free.rb
skylight-0.2.0 lib/skylight/util/allocation_free.rb