HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/share/ri/2.7.0/system/Enumerator/Lazy/new-c.ri
U:RDoc::AnyMethod[iI"new:ETI"Enumerator::Lazy::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[	I"OCreates a new Lazy enumerator. When the enumerator is actually enumerated ;TI"N(e.g. by calling #force), +obj+ will be enumerated and each value passed ;TI"Jto the given block. The block can yield values back using +yielder+. ;TI"6For example, to create a "filter+map" enumerator:;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;	[I"def filter_map(sequence)
;TI"0  Lazy.new(sequence) do |yielder, *values|
;TI"     result = yield *values
;TI"%    yielder << result if result
;TI"  end
;TI"	end
;TI"
;TI"Bfilter_map(1..Float::INFINITY) {|i| i*i if i.even?}.first(5)
;TI"#=> [4, 16, 36, 64, 100];T:@format0:
@fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I":Lazy.new(obj, size=nil) { |yielder, *values| block }
;T0[I"(*args);T@FI"	Lazy;TcRDoc::NormalClass00