I would like to rotate a cube between 0 & 360 degrees but at increments of (for example) 45 degrees and have it animate between the values.

Currently I have a list with each increment, but when it goes from 360 back to 0 again it animates "backwards". What I want is it to look like an endless loop so it goes back to the beginning seamlessly.

If I use a Curve node from 0 - 360 set to Loop it gives the desired continuous loop but not the incremental rotation.