Sha256: f29d1f531f8006d0b88bb2fc7d97c1d62c4a7c8b06d95b060c21d325ba649cac
Contents?: true
Size: 250 Bytes
Versions: 15
Compression:
Stored size: 250 Bytes
Contents
# frozen_string_literal: true class ReeArray::IndexBy include Ree::FnDSL fn :index_by contract(Or[ArrayOf[Any], Enumerable], Block => Hash) def call(list, &proc) result = {} list.each { result[yield(_1)] = _1 } result end end
Version data entries
15 entries across 15 versions & 1 rubygems