Sha256: 5146a551dee96682219ee50d51678fc62bad3ac33deb6280f84bddf042b7f49f
Contents?: true
Size: 482 Bytes
Versions: 6
Compression:
Stored size: 482 Bytes
Contents
module PropCheck module Helper ## # A refinement for enumerators # to allow lazy appending of two (potentially lazy) enumerators: # >> [1,2,3].lazy_append([4,5.6]).to_a # => [1,2,3,4,5,6] module LazyAppend refine Enumerable do ## >> [1,2,3].lazy_append([4,5.6]).to_a ## => [1,2,3,4,5,6] def lazy_append(other_enumerator) [self, other_enumerator].lazy.flat_map(&:lazy) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems