function rotate(arr, forward) {
  // /!\ mute array, the mutation is "the state"
  if (forward) {
    arr.push(arr.shift());
  } else {