[Question]
  [
Given a list of non-negative integers in any reasonable format, iterate over it, skipping as many elements as every integer you step on says.
---
Here is a worked example:
```
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2] | []
 ^ First element, always include it
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2] | [0]
    ^ Skip 0 elements
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2] | [0, 1]
          ^ Skip 1 element
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2] | [0, 1, 2]
                   ^ Skip 2 elements
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2] | [0, 1, 2, 3]
Skip 3 elements; you're done
```
Another worked example, not so all-equal-deltas:
```
[4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2] | []
 ^ First element, always include it
[4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2] | [4]
                ^ Skip 4 elements
[4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2] | [4, 3]
                            ^ Skip 3 elements
[4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2] | [4, 3, 3]
                                        ^ Skip 3 elements
[4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2] | [4, 3, 3, 4]
Skip 4 elements; you're done
```
An out-of-bounds example:
```
[0, 2, 0, 2, 4, 1, 2] | []
^ First element, always include it
[0, 2, 0, 2, 4, 1, 2] | [0]
    ^ Skip 0 elements
[0, 2, 0, 2, 4, 1, 2] | [0, 2]
             ^ Skip 2 elements
[0, 2, 0, 2, 4, 1, 2] | [0, 2, 4]
Skip 4 elements; you're done (out of bounds)
```
---
# Rules
* You may not use any boring cheat among [these ones](https://codegolf.meta.stackexchange.com/q/1061/41024), they make the challenge boring and uninteresting.
* You should only return/print the final result. STDERR output is ignored.
* You may not get the input as a string of digits in any base (e.g. "0102513162" for the first case).
* You must use left-to-right order for input.
* As in the worked examples, if you go out of bounds, execution terminates as if otherwise.
* You should use `0` for skipping 0 elements.
* Given the empty list (`[]`) as input, you should return `[]`.
---
# Test cases
```
[]                                                     => []
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]                     => [0, 1, 3, 7]
[5, 1, 2, 3, 4, 5, 2, 1, 2, 1, 0, 0]                   => [5, 2, 1, 0]
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2]                         => [0, 1, 2, 3]
[4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2] => [4, 3, 3, 4]
[0, 2, 0, 2, 4, 1, 2]                                  => [0, 2, 4]
```
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest answer wins!
  
[Answer]
# [Python 2](https://docs.python.org/2/), 36 bytes
```
f=lambda x:x and x[:1]+f(x[x[0]+1:])
```
[Try it online!](https://tio.run/##JYtBCoAgFAWv8pZFf6FWFEInERdGSEGZRIvf6U10M/BmePF79zuolPxyumvdHFgzXNjARkvb@YYNG2E7qW2b4nOEF74xA2EkSEJPmAtFmdVkKsJEGIqvSeX/Dw "Python 2 – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), ~~49 44\*~~ 41 bytes
[Crossed out 44 is still regular 44 :(](https://codegolf.stackexchange.com/questions/123194/user-appreciation-challenge-1-dennis/123438#123438)
*\* -3 thanks to @ASCII-only*.
```
l=input()
while l:print l[0];l=l[l[0]+1:]
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P8c2M6@gtERDk6s8IzMnVSHHqqAoM69EISfaINY6xzYnGsTQNrSK/f8/2kBHwVBHAUga6SiYgtnGYNIMKBKroAAA "Python 2 – Try It Online")
Prints the results separated by a newline, as the OP allowed in chat. I don't think it can get any shorter as a *non-recursive full program*.
---
# How does this work?
* `l=input()` - Reads the list from the standard input.
* `while l:` - Abuses the fact that empty lists are falsy in Python, loops until the list is empty.
* `print l[0];` - Prints the first element of the list.
* `l=l[l[0]+1:]` - "Skips like a rabbit" - Trims the first `l[0]+1` from the list.
### Let's take an example
Given the list `[5, 1, 2, 3, 4, 5, 2, 1, 2, 1, 0, 0]` as input, the code performs the following (according to the explanation above) - Prints the first item of the array: `5`, trim the first 6: `[2, 1, 2, 1, 0, 0]`. We then print `2` and trim the first 3: `[1,0,0]`. Likewise, we output `1`, crop the first 2, and we get `[0]`. Of course, `0` is printed and the program terminates.
[Answer]
# Haskell, ~~29 27~~ 26 bytes
```
j(x:y)=x:j(drop x y)
j x=x
```
Saved 1 byte thanks to Zgarb.
[Try it online.](https://tio.run/##ZY3BCoMwEETvfsUcelDYQ0xiW4T9EslBsFBTq2J7iF@flk0tlsIysLP7Zq7t43YZhhh9Huq14FD7vFumGQFrkXkEDvHe9iMY3ZQB89KPTxzg0VhCRSgJhnAWVbIm562acCJY8dNJOzALaWSs@41MX0rQapd0/KJqSzb/qN5Quy/7WC6@AA)
[Answer]
# JavaScript (ES6), ~~42~~ ~~39~~ 35 bytes
```
a=>a.map((n,i)=>a.splice(i+1,n))&&a
```
```
let f = 
a=>a.map((n,i)=>a.splice(i+1,n))&&a
console.log(f([]))                                                     // => []
console.log(f([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))                     // => [0, 1, 3, 7]
console.log(f([5, 1, 2, 3, 4, 5, 2, 1, 2, 1, 0, 0]))                   // => [5, 2, 1, 0]
console.log(f([0, 1, 0, 2, 5, 1, 3, 1, 6, 2]))                         // => [0, 1, 2, 3]
console.log(f([4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2])) // => [4, 3, 3, 4]
console.log(f([0, 2, 0, 2, 4, 1, 2]))                                  // => [0, 2, 4]
```
### Old Solution 39 Bytes
```
a=>a.map(n=>i--||r.push(i=n),r=i=[])&&r
```
*-3 bytes thanks to @ThePirateBay*
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~10~~ 9 bytes
```
[¬Dg>#=ƒ¦
```
Uses the **05AB1E** encoding. [Try it online!](https://tio.run/##MzBNTDJM/f8/@tAal3Q7Zdtjkw4tA/JMdBRMdRQMdRSMdRQswKQBmAsRAZJGOgrmOgomYHGIlFEsAA "05AB1E – Try It Online")
[Answer]
## Mathematica, ~~46~~ 44 bytes
```
SequenceCases[#,{x_,y___}/;Tr[1^{y}]<=x:>x]&
```
Alternatives:
```
SequenceCases[#,{x_,y___}/;x>=Length@!y:>x]&
SequenceCases[#,l:{x_,___}/;x>Tr[1^l]-2:>x]&
```
[Answer]
# C#, 68 bytes
```
a=>{for(int i=0;i<a.Count;i+=a[i]+1)System.Console.Write(a[i]+" ");}
```
[Try it online!](https://tio.run/##tVDBSsQwEL33K4Y9NWws3W5XV9IWZA9eVhA97EE8hG4KA20iTVSk9NtrNqGrqyAodQ6PyZvhvXkp9VmjpBokb4R@4qWA@zdtRBN0Adgqa6413LreM4fShhss4UXhHm44ypAcRx9Lh7oqDSqZbVRdC9fq6FpI0WIZbVGbDKUpCqggH3hedJVqQ8sA5jHDjEcb9SwNw3nOH/BxviD@MktLrWoR7Vo0InSzGcwI6wcWnLhXoRSv8KN5SKCDnrATzS1KERL2J62YwoJCQmFJIaWwonBO4YLCmsKlHcWTmq2@mSUjY9GeEv9Dttjpe@ulQ5swmdQo/aS/duitj46J@9PUZ/TM1EmTMWn6C/2Tx7h9J/j@63IfeOyHdw "C# (Mono) – Try It Online")
Full/Formatted version:
```
namespace System
{
    class P
    {
        static void Main()
        {
            Action<Collections.Generic.List<int>> f = a =>
            {
                for (int i = 0; i < a.Count; i += a[i] + 1)
                    System.Console.Write(a[i] + " ");
            };
            f(new Collections.Generic.List<int>() { });Console.WriteLine();
            f(new Collections.Generic.List<int>() { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });Console.WriteLine();
            f(new Collections.Generic.List<int>() { 5, 1, 2, 3, 4, 5, 2, 1, 2, 1, 0, 0 });Console.WriteLine();
            f(new Collections.Generic.List<int>() { 0, 1, 0, 2, 5, 1, 3, 1, 6, 2 });Console.WriteLine();
            f(new Collections.Generic.List<int>() { 4, 5, 1, 3, 8, 3, 0, 1, 1, 3, 1, 2, 7, 4, 0, 0, 1, 2 });Console.WriteLine();
            f(new Collections.Generic.List<int>() { 0, 2, 0, 2, 4, 1, 2 });Console.WriteLine();
            Console.ReadLine();
        }
    }
}
```
---
Returning a list is longer at 107 bytes.
```
a=>{var l=new System.Collections.Generic.List<int>();for(int i=0;i<a.Count;i+=a[i]+1)l.Add(a[i]);return l;}
```
[Answer]
## [Husk](https://github.com/barbuz/Husk), ~~8~~ 6 bytes
```
←TU¡Γ↓
```
[Try it online!](https://tio.run/##yygtzv7//1HbhJDQQwvPTX7UNvn////RBjpGOiBsomOoYxQLAA "Husk – Try It Online")
-2 bytes (and a completely new solution idea) thanks to Leo!
## Explanation
I'm using the list pattern match function `Γ`.
It takes a function `f` and a list with head `x` and tail `xs`, and applies `f` to `x` and `xs`.
If the list is empty, `Γ` returns a default value consistent with its type, in this case an empty list.
We take `f` to be `↓`, which drops `x` elements from `xs`.
This function is then iterated and the resulting elements are collected in a list.
```
←TU¡Γ↓  Implicit input, e.g. [0,2,0,2,4,1,2]
    Γ↓  Pattern match using drop
   ¡    iterated infinitely: [[0,2,0,2,4,1,2],[2,0,2,4,1,2],[4,1,2],[],[],[],...
  U     Cut at first repeated value: [[0,2,0,2,4,1,2],[2,0,2,4,1,2],[4,1,2],[]]
 T      Transpose: [[0,2,4],[2,0,1],[0,2,2],[2,4],[4,1],[1,2],[2]]
←       First element: [0,2,4]
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~59~~ 55 bytes
```
l=input()
i=0
while l[i:]:i+=1;l[i:i+l[i-1]]=[]
print l
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P8c2M6@gtERDkyvT1oCrPCMzJ1UhJzrTKtYqU9vW0BrEzNQGkrqGsbG20bFcBUWZeSUKOf//RxvoKBjqKABJIx0FUzDbGEyaAUViAQ "Python 2 – Try It Online")
[Answer]
# Pyth, 22 Bytes
```
VQ aY.(Q0VeY .x.(Q0 ;Y
```
Removed a useless byte
[Answer]
# [Python 2](https://docs.python.org/2/), ~~60~~ ~~42~~ 41 bytes
-18 bytes thanks to Luis Mendo  
-1 byte thanks to Jonathan Frech  
```
x=input()
i=0
while 1:print x[i];i-=~x[i]
```
[Try it online!](https://tio.run/##K6gsycjPM/r/v8I2M6@gtERDkyvT1oCrPCMzJ1XB0KqgKDOvRKEiOjPWOlPXtg7E@P8/2kDHUMdIx1jHRMdUx0zHXMdCx1LH0CAWAA "Python 2 – Try It Online")
[Answer]
## [Retina](https://github.com/m-ender/retina), 36 bytes
Byte count assumes ISO 8859-1 encoding.
```
.+
$*
((1)*¶)(?<-2>1*¶)*
$1
%M`.
0$
```
Input and output are linefeed-separated with a trailing linefeed.
[Try it online!](https://tio.run/##TYyxDsIwDET3@45USsNRxWlaioTgC5hYGcrAwNKh4tv4AH4s2IEBWSe9s@@83p@P5VYaf5lZug1cgPfShver9afDNh3FMMAJmvPcITqU6wIWRAoTe2YOHLnjxD0lEsPfPlUWRp1aiGot0KtGZeSfnVQW@J6S/su1ZQxrmXK1Hw "Retina – Try It Online") (Uses commas instead of linefeeds to allow for convenient test suites.)
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 64 bytes
```
([]){{}(({})<>)<>{({}[()]<{}>)}{}([])}{}<>([]){{}({}<>)<>([])}<>
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/XyM6VrO6ulZDo7pW08YOiKqBrGgNzVib6lo7zVqgDFABkLKxg6kEsTUhXCDr/38DLiMuEDbhMuQyAgA "Brain-Flak – Try It Online")
```
([]){{}                          ([])}{}                         # Until the stack is empty
       (({})<>)<>                                                # Copy TOS to off stack
                 {({}[()]<{}>)}{}                                # Pop TOS times
                                        <>([]){{}({}<>)<>([])}<> # Reverse off stack
```
[Answer]
# Mathematica, ~~64~~ 50 bytes
```
±x_List:=Prepend[±Drop[x,1+#&@@x],#&@@x]
±_=±{}={}
```
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), 68 bytes
```
n=>{var t="";for(int i=0;i<n.Length;i+=n[i]+1)t+=n[i]+" ";return t;}
```
[Try it online!](https://tio.run/##lY8xa8MwEIXn@lccnmyiBsdxmhTFWQqd0qF06BAyGFdxD9ITSHJKMf7triLFTqBD8Rsex93pu6dS35dSia7WSBW8/WgjvngQgFV5LLSGV1c3zs/SpjBYwkniB7wUSFE8jK5LZz3XVK6RzG7P7CNl8RuoIO8o3zSnQoHJw5AfpIrsDmCecFzTdCuoMp8cJzntcD@ZxeZShRByJUytCAxvu0vEXk@StDyK6btCI7ZIIqoiEt/gzjcJgxmDlMGcQcZgweCBwZLBisGjHSVtHPPg7n/O4g8n7TvW7RVPGhsscQQPnzu38dKRqOyGsHLu4QMzdV/OfE7fGZ827dNmN4QB0Qbeu18 "C# (.NET Core) – Try It Online")
Takes input as an array of integers, returns a string containing the non-skipped values.
[Answer]
# R, 58 bytes
```
f=function(x,p=1){cat(z<-x[p]);if(p+z<sum(x|1))f(x,p+z+1)}
```
Recursive function. Takes a vector `x` as argument and intiates a pointer `p`. This prints the corresponding entry of `x`, checks if `p+x[p]` would go out of bounds, and if not, calls the function for the new pointer.
```
f=function(x,p=1,s=x[1])`if`((z<-x[p]+p+1)>sum(x|1),s,f(x,z,c(s,x[z])))
```
This is a comparable solution that returns a proper vector instead of printing the digits.
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 53 bytes
Thanks to @PunPun1000 and @TheLethalCoder
```
a->{for(int n=0;;n+=1+a[n])System.out.println(a[n]);}
```
[Try it online!](https://tio.run/##ZY4xc4MwDIV3foVGKIlDkksWhyydOnTKyDG4xKGmIHO2SK/H5be7MtdMHSTZ35OfX6fuam1Hjd31K5hhtI6gYyYmMr14kck/dpuwIWMxisk4ffSmgaZX3sO7Mjg/kSdFPO7WXGFgIb2QM9hWtXKtz@bk1aKfBu1OBqmqzxBtoYSg1uf5Zl3KGLAspMS83Oaqwjq7/HjSg7ATiZG9qMd04fIROGe0AdKe2AX1N0QQ/xK9xpY@a5k8bQ1vFNKc4vKfKk2ec6hIKlOz/oakW@3EqJzXfEmjFUuZTB5JzCpU0@iR0vhkgY/NpipWsF0B990KDst5v/QjkzqEImy5duHAc891DLtf "Java (OpenJDK 8) – Try It Online")
[Answer]
## [Alice](https://github.com/m-ender/alice), 15 bytes
```
/$.. \h&
\I@nO/
```
[Try it online!](https://tio.run/##S8zJTE79/19fRU9PISZDjSvG0yHPX///fxMuUy5DLmMuCyA2ALJAbEMuIy5zLhMgHyRiBAA "Alice – Try It Online")
Input and output a linefeed-separated lists of decimal integers.
### Explanation
```
/   Switch to Ordinal mode.
I   Read a line.
.   Duplicate it.
n   Logical NOT (gives truthy if we're at EOF).
/   Switch to Cardinal.
    The IP wraps around to the left.
\   Switch to Ordinal.
$@  Terminate the program if we're at EOF.
.   Duplicate the input line again.
O   Print it.
\   Switch to Cardinal.
h   Increment the value.
&   Store the result in the iterator queue.
    The program wraps around to the beginning.
```
Storing an integer **n** in the iterator queue causes the next command to be executed **n** times. Mirrors like `/` are not commands, so the next command will be `I`. Therefore if we just read and printed a value **x**, we will read **x+1** values on the next iteration, with the last of them ending up on top of the stack. This skips the required number list elements.
[Answer]
## *Mathematica*, 37 (30?)
Further golfing of user202729's fine method.
```
±{a_,x___}={a}~Join~±{x}~Drop~a
±_={}
```
The rules don't seem to explicitly specify the output format, so maybe:
```
±{a_,x___}=a.±{x}~Drop~a
±_={}
```
Output for the second function looks like: `0.2.4.{}` — notably `{}` is still returned for an empty set, conforming to the final rule.
[Answer]
# Common Lisp, 51 bytes
```
(do((x(read)(nthcdr(1+(print(car x)))x)))((not x)))
```
[Try it online!](https://tio.run/##Hcs5DoAgFEXRrbzy/diAs8sxYCKJAfKlYPc4FLc4xXVXuHNr9Ims1GP3wlhO55W2Y9YQC92uqCLyRcZUfr2TgUWPASMmzFiwYoM18gA)
[Answer]
# [Brain-Flak](https://github.com/Flakheads/BrainHack), ~~64~~ 60 bytes
*4 bytes save based on an idea from [0 '](https://codegolf.stackexchange.com/users/20059/0)*
```
([]){{}(({})<>())<>{({}[()]<{}>)}{}([])}{}<>{({}[()]<>)<>}<>
```
[Try it online!](https://tio.run/##TYo7DoAwDEOvk2xQBFOVi1QdCgsIiYHVytmNRwb/5Le/43rOcdykte5AmiG9hrkM6s28V2R46hOi@B0hSpvkxFkqXJWLtLF8 "Brain-Flak (BrainHack) – Try It Online")
## Annotated
```
([]){{}            #{Until the stack is empty}
  (({})<>())<>     #{Put n+1 to the offstack}
  {({}[()]<{}>)}{} #{Remove n items from the top}
([])}{}            #{End until}
<>                 #{Swap stacks}
{({}[()]<>)<>}<>   #{Move everything back onto the left stack decrementing by 1}
```
[Answer]
# Ruby, ~~36 33~~ 31
```
f=->l{a,*l=l;a&&f[l.drop(p a)]}
```
[Try it online.](https://tio.run/##KypNqvz/P81W1y6nOlFHK8c2xzpRTS0tOkcvpSi/QKNAIVEztvZ/ml5yYk6OQrSJjoKpjoKhjoKxjoIFmDQAcyEiQNJIR8FcR8EELA6RMor9DwA)
[Answer]
## Python 2.4, 85 bytes
No chance to win in python with it, but I love oneliners and this one might be interesting to others.  
Turns out, there is a fancy magic trick to access building list inside comprehension, but it works only in 2.4 and with some edits in <= 2.3  
`locals()['_[1]']` it is.
Python creates secret name `_[1]` for list, while it is created and store it in `locals`. Also names `_[2]`, `_[3]`... are used for nested lists.
```
lambda n:[j for i,j in enumerate(n)if i==len(locals()['_[1]'])+sum(locals()['_[1]'])]
```
So it counts number of already added elements plus their sum. Result is the index of next desired element.  
I think, that there should be a way to avoid enumerate. Like accessing input array directly by index: `[ n[len(locals()['_[1]'])+sum(locals()['_[1]'])] for ... ]`. But I can't figure out a compact way to protect it from index-out-of-range (while keeping it oneliner)
[![enter image description here](https://i.stack.imgur.com/1F5RJ.png)](https://i.stack.imgur.com/1F5RJ.png)
[Answer]
# Swift, 63 bytes
```
func a(d:[Int]){var i=0;while i<d.count{print(d[i]);i+=d[i]+1}}
```
This is my first entry, ever, so I'm not 100% sure on the rules, but hopefully this answer suffices. I'm a little unsure of rules on how to get the input into a system. I have a shorter answer if I was allowed to assume a function somewhere that can return the input.
[Answer]
# [Perl 6](https://perl6.org), 31 bytes
```
{(@_,{.[1+.[0]..*]}...^0)[*;0]}
```
[Test it](https://tio.run/##nZDPa4MwHMXv@SveadU2DdGp7RDFHXbrcewi2RiageBsqHasSP@y3faPuRirK@wHYzkE8v2@9@G9KLkrg25fS7wELAvJ8wEX2TaXiLrWSh5oy1JnwVIuGJuLI2PsntvpPOTi2Glp0si6QYSyqGRt2e9vrFZl0VizKJ71r5u7601IevqtFoZElY8VFsYVkqft7gRYxrCQFJXaNxSJfFUya2QOGy0BinqZS6nKA/pc1iCz2aaoz8Xj22yZ0q1CcuxSgf@cKEYqSMopHAqX4pLCo/ApAooVxZriSq@4@NE8OLVtpTH@F4w7TvStpd@Ceswk5VMabkb@yHdMJlf8WuWzh8Z4Z@61uYf1xHNNR29INkyEwXhG0ZcY0rhjGm9U/eljTx7xAQ "Perl 6 – Try It Online")
## Expanded:
```
{  # bare block lambda with implicit parameter ｢@_｣
  (
    # generate a sequence
    @_,
    {
      .[ # index into previous value in the sequence
        1 + .[0]  # start by skipping one plus the first element
                  # of the previous value in the sequence
        ..  *     # use that to create a Range with no end
      ]
    }
    ...^  # keep doing that until: (and throw away last value)
    0     # it generates an empty list
  )[ *; 0 ]  # from every value in the sequence, get the first element
}
```
To help understand how the code works, without `[*;0]` this would generate a sequence like the following:
```
[0, 1, 0, 2, 5, 1, 3, 1, 6, 2],
   (1, 0, 2, 5, 1, 3, 1, 6, 2),
         (2, 5, 1, 3, 1, 6, 2),
                  (3, 1, 6, 2)
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ḢṄ‘ṫ@µL¿
```
A full program printing the results each followed by a newline (empty list produces no output).
**[Try it online!](https://tio.run/##y0rNyan8///hjkUPd7Y8apjxcOdqh0NbfQ7t////f7SJjoKpjoKhjoKxjoIFmDQAcyEiQNJIR8FcR8EELA6RMooFAA "Jelly – Try It Online")**
### How?
```
ḢṄ‘ṫ@µL¿ - Main link: list of non-negative integers  e.g. [2,5,4,0,1,2,0]
       ¿ - while:           Iteration:  1                  2             3          4        5
      L  -   length (0 is falsey)       7                  4             3          1        0
     µ   - ...do:                                                                            stop
Ḣ        -   head (pop & modify)        2 ([5,4,0,1,2,0])  0 ([1,2,0])   1 ([2,0])  0 ([0])
 Ṅ       -   print it (and yield it)   "2\n"              "0\n"         "1\n"      "0\n"
  ‘      -   increment                  3                  1             2          1
   ṫ@    -   tail from index            [0,1,2,0]          [1,2,0]      [0]         []
         -
         -                       i.e. a resulting in the printing of: '''2
                                                                         0
                                                                         1
                                                                         0
                                                                         '''
```
[Answer]
# [Python 3](https://docs.python.org/3/), 35 bytes
```
f=lambda h=0,*t:t and[h,*f(*t[h:])]
```
[Try it online!](https://tio.run/##K6gsycjPM/7/P802JzE3KSVRIcPWQEerxKpEITEvJTpDRytNQ6skOsMqVjP2/38A "Python 3 – Try It Online")
Run it with `f(*l)` where `l` is your input. Arguably stretching the rules for input, but I just love advanced unpacking.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 20 bytes[SBCS](https://github.com/abrudz/SBCS)
```
{⍵≡⍬:⍬⋄(⊃,∘∇1↓⊃↓⊢)⍵}
```
[Try it online!](https://tio.run/##bU5BCsIwELznFXuLgkKStrb2NwWpFAuVkotIT0qtSkUQwas9e/Xic/YjdZOKqLiwy2R2ZjbRPB1OFlGaTVs8nJMMy6NoY5pLrO@4vWJ9C6lxv@7hbjXA6oLVRmJ5opedTZ@ERdvqt6fJCcZYP0IeR0nKCRGfUwTPZrxgAiQocMAFD0bgQwBjkAK@SoNROeAz70OtLJa0Ez/qbidstiDsWbekfAW/1WVTJnNfuoDacJ1H0Z9ce8NgTdgx95nJNe1a/n/pTvEE "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/), ~~36~~ 30 + 1 (-a) = 31 bytes
```
$i+=$F[$i]+say$F[$i]while$i<@F
```
[Try it online!](https://tio.run/##K0gtyjH9/18lU9tWxS1aJTNWuzixEsIqz8jMSVXJtHFw@//fREfBVEfBUEfBWEfBAkwagLkQESBppKNgrqNgAhaHSBn9yy8oyczPK/6v62uqZ2Bo8F83EQA "Perl 5 – Try It Online")
Takes its input as a space separated list of numbers.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 25 bytes
```
$args|?{!$s--}|%{($s=$_)}
```
[Try it online!](https://tio.run/##nZJRS8MwFIXf@yuOIZMEbqGL6TaFYf/JGBr1oeBsNlTa/vZ6lyy1MhUxD/fh3nO@nEuye351jX9ydT3IB6zRDnLbPPrutr2QPs/7btYq6ddyo/uhz7JKZeBDqlIa/zkEduoRUhDmBEO4IlhCSVgQloQV4ZpHhf4REp1sW05w5RnOpA5XtnwLPOJGaXGWrgijMt03DxmN/nXFz70mODuhrEKNspFrwu42Jo0dHXA2KI5LfU1nUjqb1H96gJOHWRodZmgDkx@@2b4TpHvbubu9u@fvIDdx1Dh/qPfcuORfUgVhGAipxGkocvciRq/QN8klsn74AA "PowerShell – Try It Online")
]