How do i create auto reverse bootstrap carousel slide

How do i create an auto reverse bootstrap carousel slide to work this way?
1,2,3,4 , 3,2,1, 1,2,3,4

If I was user, I don’t think I would understand why the carousel would work that way. But for that specific order just repeat carousel items 1, 2, 3. Render them in this order:

1, 2, 3, 4, 3, 2, 1

If you were looking for the direction to change on the cycle, you can specify the direction in javascript.