In-between fractions
The challenge:
You will need to create code that takes atleast 3 inputs; 2 integers and "a fraction representation" - whichever type suits your language for representing the fraction increments) ie. If you choose string the input would be "1/4" or you could choose 2 extra integer inputs or a tuple or w/e.
Input can be anywhere reasonable (STDIN, function arguments, from a file, etc.), and so can output (STDOUT, function return value, to a file, etc.)
Rules:
- The input "fraction" will always be a valid fraction, less than 1; example "1/4"
- The second input integer will always have a higher value than the first integer. I.E the first input integer will always have a lower value than the second.
- The input integers can be negative.
- Outputted fractions should be reduced as much as possible (simplified)
The code will need to output every "fraction step" between the 2 numbers in increments of the input fraction.
The code should be a program or function as stated here
Example 1:
Input: -2,3,"1/2"
Output:
-2
-3/2
-1
-1/2
0
1/2
1
3/2
2
5/2
3
Example 2:
Input: 1,2,"2/3"
Output:
1
5/3
2
or
1
4/3
2
Note: Counting can start from either direction (thank you @Mego)
This is code-golf, so the shortest answer in bytes wins.