txt: ## raceseq.md
  class RaceSeq
  
  Performs batches of work in parallel without respecting original order.
  
  ```raku
  class RaceSeq does Iterable does Sequence { }
  ```
  
  A `RaceSeq` is the intermediate object used when [`race`](/routine/race) is invoked on a [`Seq`](/type/Seq). In general, it's not intended for direct consumption by the developer.
  
  # [Methods](#class_RaceSeq "go to top of document")[§](#Methods "direct link")
  
  ## [method iterator](#class_RaceSeq "go to top of document")[§](#method_iterator "direct link")
  
  ```raku
  method iterator(RaceSeq:D: --> Iterator:D)
  ```
  
  Returns the underlying iterator.
  
  ## [method grep](#class_RaceSeq "go to top of document")[§](#method_grep "direct link")
  
  ```raku
  method grep(RaceSeq:D: $matcher, *%options)
  ```
  
  Applies `grep` to the `RaceSeq` similarly to how it would do it on a [`Seq`](/type/Seq).
  
  ```raku
  my @raced = (^10000).map(*²).race;
  @raced.grep( * %% 3 ).say;
  # OUTPUT: «(0 9 36 81 144 ...)␤»
  
  ```
  
  When you use `race` on a [`Seq`](/type/Seq), this is the method that is actually called.
  
  ## [method map](#class_RaceSeq "go to top of document")[§](#method_map "direct link")
  
  ```raku
  method map(RaceSeq:D: $matcher, *%options)
  ```
  
  Uses maps on the `RaceSeq`, generally created by application of `.race` to a preexisting [`Seq`](/type/Seq).
  
  ## [method invert](#class_RaceSeq "go to top of document")[§](#method_invert "direct link")
  
  ```raku
  method invert(RaceSeq:D:)
  ```
  
  Inverts the `RaceSeq` created from a [`Seq`](/type/Seq) by `.race`.
  
  ## [method race](#class_RaceSeq "go to top of document")[§](#method_race "direct link")
  
  ```raku
  method race(RaceSeq:D:)
  ```
  
  Returns the object.
  
  ## [method hyper](#class_RaceSeq "go to top of document")[§](#method_hyper "direct link")
  
  ```raku
  method hyper(RaceSeq:D:)
  ```
  
  Creates a [`HyperSeq`](/type/HyperSeq) object out of the current one.
  
  ## [method serial](#class_RaceSeq "go to top of document")[§](#method_serial "direct link")
  
  ```raku
  multi method serial(RaceSeq:D:)
  ```
  
  Converts the object to a [`Seq`](/type/Seq) and returns it.
  
  ## [method is-lazy](#class_RaceSeq "go to top of document")[§](#method_is-lazy "direct link")
  
  ```raku
  method is-lazy(--> False )
  ```
  
  Returns `False`.
  
  ## [method sink](#class_RaceSeq "go to top of document")[§](#method_sink "direct link")
  
  ```raku
  method sink(--> Nil)
  ```
  
  Sinks the underlying data structure, producing any side effects.
  
  # [Typegraph](# "go to top of document")[§](#typegraphrelations "direct link")
  
  Type relations for `RaceSeq`
  
  
  
  raku-type-graph
  
  
  
  RaceSeq
  RaceSeq
  
  
  Any
  Any
  
  
  RaceSeq->Any
  
  
  
  Iterable
  Iterable
  
  
  RaceSeq->Iterable
  
  
  
  Sequence
  Sequence
  
  
  RaceSeq->Sequence
  
  
  
  Mu
  Mu
  
  
  Any->Mu
  
  
  
  PositionalBindFailover
  PositionalBindFailover
  
  
  Sequence->PositionalBindFailover
  
  [Expand chart above](/assets/typegraphs/RaceSeq.svg)
  