ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? U:RDoc::NormalClass[iI" Lazy:ETI"Enumerator::Lazy;TI"Enumerator;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[ I"PEnumerator::Lazy is a special type of Enumerator, that allows constructing ;TI"Nchains of operations without evaluating them immediately, and evaluating ;TI"Rvalues on as-needed basis. In order to do so it redefines most of Enumerable ;TI"Amethods so that they just construct another lazy enumerator.;To:RDoc::Markup::BlankLineo; ;[I"FEnumerator::Lazy can be constructed from any Enumerable with the ;TI"Enumerable#lazy method.;T@o:RDoc::Markup::Verbatim;[I"Xlazy = (1..Float::INFINITY).lazy.select(&:odd?).drop(10).take_while { |i| i < 30 } ;TI"# => #:select>:drop(10)>:take_while> ;T: @format0o; ;[I"PThe real enumeration is performed when any non-redefined Enumerable method ;TI"Pis called, like Enumerable#first or Enumerable#to_a (the latter is aliased ;TI"'as #force for more semantic code):;T@o; ;[ I"lazy.first(2) ;TI"#=> [21, 23] ;TI" ;TI"lazy.force ;TI"#=> [21, 23, 25, 27, 29] ;T; 0o; ;[I"LNote that most Enumerable methods that could be called with or without ;TI">a block, on Enumerator::Lazy will always require a block:;T@o; ;[I":[1, 2, 3].map #=> # ;TI"Q[1, 2, 3].lazy.map # ArgumentError: tried to call lazy map without a block ;T; 0o; ;[I"UThis class allows idiomatic calculations on long or infinite sequences, as well ;TI"Jas chaining of calculations without constructing intermediate arrays.;T@o; ;[I";Example for working with a slowly calculated sequence:;T@o; ;[I"require 'open-uri' ;TI" ;TI"1# This will fetch all URLs before selecting ;TI"# necessary data ;TI"3URLS.map { |u| JSON.parse(URI.open(u).read) } ;TI"- .select { |data| data.key?('stats') } ;TI" .first(5) ;TI" ;TI"2# This will fetch URLs one-by-one, only till ;TI"5# there is enough data to satisfy the condition ;TI"8URLS.lazy.map { |u| JSON.parse(URI.open(u).read) } ;TI"- .select { |data| data.key?('stats') } ;TI" .first(5) ;T; 0o; ;[I"IEnding a chain with ".eager" generates a non-lazy enumerator, which ;TI"Iis suitable for returning or passing to another method that expects ;TI"a normal enumerator.;T@o; ;[I"def active_items ;TI" groups ;TI" .lazy ;TI" .flat_map(&:items) ;TI" .reject(&:disabled) ;TI" .eager ;TI" end ;TI" ;TI"?# This works lazily; if a checked item is found, it stops ;TI":# iteration and does not look into remaining groups. ;TI"2first_checked = active_items.find(&:checked) ;TI" ;TI"E# This returns an array of items like a normal enumerator does. ;TI"1all_checked = active_items.select(&:checked);T; 0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[[[[[I" class;T[[: public[[I"new;TI"enumerator.c;T[:protected[[: private[[I" instance;T[[;[4[I"_enumerable_collect;T@h[I"_enumerable_collect_concat;T@h[I"_enumerable_drop;T@h[I"_enumerable_drop_while;T@h[I"_enumerable_filter;T@h[I"_enumerable_filter_map;T@h[I"_enumerable_find_all;T@h[I"_enumerable_flat_map;T@h[I"_enumerable_grep;T@h[I"_enumerable_grep_v;T@h[I"_enumerable_map;T@h[I"_enumerable_reject;T@h[I"_enumerable_select;T@h[I"_enumerable_take;T@h[I"_enumerable_take_while;T@h[I"_enumerable_uniq;T@h[I"_enumerable_zip;T@h[I" chunk;T@h[I"chunk_while;T@h[I" collect;T@h[I"collect_concat;T@h[I" compact;T@h[I" drop;T@h[I"drop_while;T@h[I" eager;T@h[I" enum_for;T@h[I" filter;T@h[I"filter_map;T@h[I" find_all;T@h[I" flat_map;T@h[I" force;T@h[I" grep;T@h[I" grep_v;T@h[I" lazy;T@h[I"map;T@h[I" reject;T@h[I" select;T@h[I"slice_after;T@h[I"slice_before;T@h[I"slice_when;T@h[I" take;T@h[I"take_while;T@h[I" to_a;T@h[I" to_enum;T@h[I" uniq;T@h[I"with_index;T@h[I"zip;T@h[;[[;[[I"_enumerable_with_index;T@h[[U:RDoc::Context::Section[i0o;;[; 0;0[@\@ cRDoc::NormalClass