Sha256: 8af63cc76670325d2440f47bbbfdf69fb8453280e8d8230d03a0f07eba2328fd
Contents?: true
Size: 266 Bytes
Versions: 1
Compression:
Stored size: 266 Bytes
Contents
module HyperIterator def each_slice!(slice_size) i = 0 while count > 0 current_slice = [] while i < slice_size && count > 0 current_slice << shift i += 1 end yield current_slice i = 0 end nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hyper_iterator-0.3.0 | lib/iterators/each_slice_bang.rb |