Sha256: 488c844842c0b71b9c90bf4a85444bf2def260bd37158c285ce764050569c33b

Contents?: true

Size: 518 Bytes

Versions: 12

Compression:

Stored size: 518 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

12 entries across 12 versions & 1 rubygems

Version Path
prop_check-0.15.0 lib/prop_check/helper/lazy_append.rb
prop_check-0.14.1 lib/prop_check/helper/lazy_append.rb
prop_check-0.14.0 lib/prop_check/helper/lazy_append.rb
prop_check-0.13.0 lib/prop_check/helper/lazy_append.rb
prop_check-0.12.1 lib/prop_check/helper/lazy_append.rb
prop_check-0.12.0 lib/prop_check/helper/lazy_append.rb
prop_check-0.11.1 lib/prop_check/helper/lazy_append.rb
prop_check-0.11.0 lib/prop_check/helper/lazy_append.rb
prop_check-0.10.4 lib/prop_check/helper/lazy_append.rb
prop_check-0.10.3 lib/prop_check/helper/lazy_append.rb
prop_check-0.10.2 lib/prop_check/helper/lazy_append.rb
prop_check-0.10.1 lib/prop_check/helper/lazy_append.rb