Sha256: 67458af79fc5d184c676a46afc448e76834b9127ef7020c3de19cc63354c31c0
Contents?: true
Size: 481 Bytes
Versions: 38
Compression:
Stored size: 481 Bytes
Contents
module Abstractivator module Collections def multizip(enumerables, pad_value=nil) es = enumerables.map(&:each) result = [] fail_count = 0 while fail_count < es.size do fail_count = 0 heads = es.map do |e| begin e.next rescue StopIteration fail_count += 1 pad_value end end result << heads if fail_count < es.size end result end end end
Version data entries
38 entries across 38 versions & 1 rubygems