txt: ## eager.md
  eager
  
  Combined from primary sources listed below.
  
  # [In List](#___top "go to top of document")[§](#(List)_routine_eager "direct link")
  
  See primary documentation
  [in context](/type/List#routine_eager)
  for **routine eager**.
  
  ```raku
  multi method eager(List:D: --> List:D)
  ```
  
  Evaluates all elements in the `List` eagerly, and returns them as a `List`.
  
  ```raku
  my  \ll = (lazy 1..5).cache;
  
  say ll[];     # OUTPUT: «(...)␤»
  say ll.eager  # OUTPUT: «(1 2 3 4 5)␤»
  ```
  
  # [In role Sequence](#___top "go to top of document")[§](#(role_Sequence)_method_eager "direct link")
  
  See primary documentation
  [in context](/type/Sequence#method_eager)
  for **method eager**.
  
  ```raku
  method eager(::?CLASS:D: --> List:D)
  ```
  
  Returns an eagerly evaluated [`List`](/type/List) based on the invocant sequence, and marks it as consumed. If called on an already consumed [`Seq`](/type/Seq), throws an error of type [`X::Seq::Consumed`](/type/X/Seq/Consumed).
  
  ```raku
  my $s = lazy 1..5;
  
  say $s.is-lazy; # OUTPUT: «True␤»
  say $s.eager;   # OUTPUT: «(1 2 3 4 5)␤»
  
  say $s.eager;
  CATCH {
      when X::Seq::Consumed {
          say 'Throws exception if already consumed';
      }
  }
  # OUTPUT: «Throws exception if already consumed␤»
  ```
  
  # [In Any](#___top "go to top of document")[§](#(Any)_method_eager "direct link")
  
  See primary documentation
  [in context](/type/Any#method_eager)
  for **method eager**.
  
  ```raku
  method eager() is nodal
  ```
  
  Interprets the invocant as a [`List`](/type/List), evaluates it eagerly, and returns that [`List`](/type/List).
  
  ```raku
  my  $range = 1..5;
  say $range;         # OUTPUT: «1..5␤»
  say $range.eager;   # OUTPUT: «(1 2 3 4 5)␤»
  ```
  