txt: ## skip.md
  skip
  
  Combined from primary sources listed below.
  
  # [In Seq](#___top "go to top of document")[§](#(Seq)_method_skip "direct link")
  
  See primary documentation
  [in context](/type/Seq#method_skip)
  for **method skip**.
  
  ```raku
  multi method skip(Seq:D:)
  multi method skip(Seq:D: Whatever)
  multi method skip(Seq:D: Callable:D $w)
  multi method skip(Seq:D: Int() $n)
  multi method skip(Seq:D: $skip, $produce)
  ```
  
  Returns a Seq containing whatever is left of the invocant after throwing away `$n` of the next available values. Negative values of `$n` count as 0. Also can take a [`WhateverCode`](/type/WhateverCode) to indicate how many values to skip from the end. Will block on lazy Seqs until the requested number of values have been discarded.
  
  ```raku
  say (1..5).Seq.skip;      # OUTPUT: «(2 3 4 5)␤»
  say (1..5).Seq.skip(3);   # OUTPUT: «(4 5)␤»
  say (1..5).Seq.skip(5);   # OUTPUT: «()␤»
  say (1..5).Seq.skip(-1);  # OUTPUT: «(1 2 3 4 5)␤»
  ```
  
  Calling it with [`Whatever`](/type/Whatever) will return an empty `Seq`:
  
  ```raku
  say <1 2 3>.Seq.skip(*);  # OUTPUT: «()␤»
  ```
  
  The multi that uses a Callable is intended mainly to be used this way:
  
  ```raku
  say (1..5).Seq.skip(*-3); # OUTPUT: «(3 4 5)␤»
  ```
  
  Instead of throwing away the first `$n` elements, it throws away everything *but* the elements indicated by the WhateverCode, in this case all but the last three elements.
  
  As of language version `6.e` (early implementation exists in Rakudo compiler 2022.12+), it is also possible to specify multiple argument values. These are then interpreted as number of values to produce, then skip, then produce, etc.
  
  ```raku
  say (1..12).Seq.skip(2,3,4); # OUTPUT: «(3 4 5 10 11 12)␤»
  ```
  
  This first skipped 2 values, then produced 3 values (3, 4, 5), skipped 4 values and then produced the rest (10, 11, 12).
  
  If the final value specified is in a "produce" position, then the rest of the `Seq` will be skipped. If the final value is in a "skip" position, then the rest of the `Seq` will be produced.
  
  ```raku
  say (1..10).Seq.skip(2,3,1,2); # OUTPUT: «(3 4 5 7 8)␤»
  say (1..10).Seq.skip(2,3,1);   # OUTPUT: «(3 4 5 7 8 9 10)␤»
  ```
  
  If a [`Whatever`](/type/Whatever) is specified in a "produce" position, it will cause the rest of the `Seq` to be produced. Otherwise, it will cause the rest if the `Seq` to be skipped.
  
  ```raku
  say (1..10).Seq.skip(2,*);   # OUTPUT: «(3 4 5 6 7 8 9 10)␤»
  say (1..10).Seq.skip(2,3,*); # OUTPUT: «(3 4 5)␤»
  ```
  
  If you want to start with producing values instead of skipping, specify **0** as the first value.
  
  ```raku
  say (1..10).Seq.skip(0,3,4); # OUTPUT: «(1 2 3 8 9 10)␤»
  ```
  
  If you want an unending repeating pattern of skips and produces, you can specify the arguments as an unending `Seq` themselves.
  
  ```raku
  say (^20).Seq.skip(|(2,3) xx *); # OUTPUT: «(0 1 5 6 10 11 15 16)␤»
  ```
  
  # [In Any](#___top "go to top of document")[§](#(Any)_routine_skip "direct link")
  
  See primary documentation
  [in context](/type/Any#routine_skip)
  for **routine skip**.
  
  ```raku
  multi method skip()
  multi method skip(Whatever)
  multi method skip(Callable:D $w)
  multi method skip(Int() $n)
  multi method skip($skip, $produce)
  ```
  
  Creates a [`Seq`](/type/Seq) from 1-item list's iterator and uses [`Seq.skip`](/type/Seq#method_skip) on it, please check that document for real use cases; calling `skip` without argument is equivalent to `skip(1)`.
  
  ```raku
  multi skip(\skipper, +values)
  ```
  
  As of release 2022.07 of the Rakudo compiler, there is also a "sub" version of `skip`. It **must** have the skip specifier as the first argument. The rest of the arguments are turned into a [`Seq`](/type/Seq) and then have the `skip` method called on it.
  
  # [In Supply](#___top "go to top of document")[§](#(Supply)_method_skip "direct link")
  
  See primary documentation
  [in context](/type/Supply#method_skip)
  for **method skip**.
  
  ```raku
  method skip(Supply:D: Int(Cool) $number = 1 --> Supply:D)
  ```
  
  Returns a new `Supply` which will emit all values from the given `Supply` except for the first `$number` values, which will be thrown away.
  
  ```raku
  my $supplier = Supplier.new;
  my $supply = $supplier.Supply;
  $supply = $supply.skip(3);
  $supply.tap({ say $_ });
  $supplier.emit($_) for 1..10; # OUTPUT: «4␤5␤6␤7␤8␤9␤10␤»
  
  ```
  
  # [In module Test](#___top "go to top of document")[§](#(module_Test)_sub_skip "direct link")
  
  See primary documentation
  [in context](/type/Test#sub_skip)
  for **sub skip**.
  
  ```raku
  multi skip()
  multi skip($reason, $count = 1)
  ```
  
  Skip `$count` tests, giving a `$reason` as to why. By default only one test will be skipped. Use such functionality when a test (or tests) would die if run.
  
  ```raku
  sub num-forward-slashes($arg) { ... } ;
  
  if $*KERNEL ~~ 'linux' {
      is num-forward-slashes("/a/b"),             2;
      is num-forward-slashes("/a//b".IO.cleanup), 2;
  }
  else {
      skip "Can't use forward slashes on Windows", 2;
  }
  
  ```
  
  Note that if you mark a test as skipped, you must also prevent that test from running.
  