The first, the last, and everything between Given two integers, output the two integers, and then the range between them (excluding both).
The order of the range must be the same as the input.
Examples:
 Input        Output
 0,  5   -&gt;   [0, 5, 1, 2, 3, 4]
-3,  8   -&gt;   [-3, 8, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
 4,  4   -&gt;   [4, 4]
 4,  5   -&gt;   [4, 5]
 8,  2   -&gt;   [8, 2, 7, 6, 5, 4, 3]
-2, -7   -&gt;   [-2, -7, -3, -4, -5, -6]
R, 39 33 30 bytes



c(a&lt;-scan(),setdiff(a:a[2],a))


Try it online!

Thanks for saved bytes to user2390246 and J.Doe.