txt: ## is-lazy.md
  is-lazy
  
  Combined from primary sources listed below.
  
  # [In Seq](#___top "go to top of document")[§](#(Seq)_method_is-lazy "direct link")
  
  See primary documentation
  [in context](/type/Seq#method_is-lazy)
  for **method is-lazy**.
  
  ```raku
  method is-lazy(Seq:D:)
  ```
  
  Returns `True` if and only if the underlying iterator or cached list considers itself lazy. If called on an already consumed sequence, throws an error of type [`X::Seq::Consumed`](/type/X/Seq/Consumed).
  
  # [In HyperSeq](#___top "go to top of document")[§](#(HyperSeq)_method_is-lazy "direct link")
  
  See primary documentation
  [in context](/type/HyperSeq#method_is-lazy)
  for **method is-lazy**.
  
  ```raku
  method is-lazy(--> False )
  ```
  
  Returns `False`.
  
  # [In RaceSeq](#___top "go to top of document")[§](#(RaceSeq)_method_is-lazy "direct link")
  
  See primary documentation
  [in context](/type/RaceSeq#method_is-lazy)
  for **method is-lazy**.
  
  ```raku
  method is-lazy(--> False )
  ```
  
  Returns `False`.
  
  # [In role Iterator](#___top "go to top of document")[§](#(role_Iterator)_method_is-lazy "direct link")
  
  See primary documentation
  [in context](/type/Iterator#method_is-lazy)
  for **method is-lazy**.
  
  ```raku
  method is-lazy(Iterator:D: --> Bool:D)
  ```
  
  Should return `True` for iterators that consider themselves lazy, and `False` otherwise.
  
  Built-in operations that know that they can produce infinitely many values return `True` here, for example `(1..6).roll(*)`.
  
  ```raku
  say (1 .. 100).iterator.is-lazy; # OUTPUT: «False␤»
  say (1 .. ∞).iterator.is-lazy; # OUTPUT: «True␤»
  ```
  
  The Iterator role implements this method returning `False`, indicating a non-lazy iterator.
  