Dancing arrays. Output them with some forward-backward moves The task is to create a program (or a function), which outputs array elements  in the order, determined by two numbers F and B. F is number of elements to print, B is the rollback distance (from last printed element). Each element must be printed on separate line and blank line must be inserted after each rollback. Run till the end of array. If endless loop or backward progression requested, program should print nothing and exit. Same for empty arrays.

F and B cannot be negative numbers. Be positive while dancing!

For example, if given:

array is 2, 3, 5, 7, 11, 101, 131;
F is 4;
B is 1;


then output must be:

2
3
5
7

5
7
11
101

11
101
131


Init array, F and B as you like.

Shortest code wins. Imperative beauty will be enjoyed.

Test cases:

Empty array.
Any F.
Any B.


Produces no output (array is empty).



Array: [42]
F = 0;
B = 1;


Produces no output (zero elements to print).



Array: [42, 17, 84]
F = 2;
B = 1;


Produces no output (endless printing).



Array: [7, 16, 65]
F = 2;
B = 3;


Produces no output (will be moving backward to negative indices).



Array: [7, 16, 65]
F = 2;
B = 0;


Output:

7
16

16
65




Array: [7, 16, 65]
F = 3;
B = 2;


Output:

7
16
65


(no rollback, end of array is reached).



Array: [7, 16, 65]
F = 17;
B = 15;


Output:

7
16
65


(run till the end)



Array: [7, 16, 65]
F = 17;
B = 16;


Output:

7
16
65


Whole array can be printed in first iteration, run till the end is working, even if F and B form endless-loop condition.
Python 2, 135 128 126 bytes



Pretty naive solution:

a,f,b=input()
b+=1
l=len(a)
i=0
e=min(l,f)
while f>b:
    print'\n'.join(map(str,a)[i:e])+'\n';i=e-b
    if e==l:f=b
    e=min(l,e+f-b)


Try it online!

Input format is [array], F, B except you can also use (). (You can't use {} because that's unordered; thanks to Felipe Batista for pointing that out because I forgot).
Output format is as specified in the challenge, with a single trailing newline at the end of all output and no leading whitespace.

-7 bytes by changing if f&gt;b: while 1: to while f&gt;b
-2 bytes by changing break to f=b because that causes the while loop to exit.