I have an array that goes from '00:00:00' to '23:59:59', something like this ['00:00:00', '00:00:01' ... '23:59:59'].
I need to write a function to reduce the array length into n items but always keeping the first and the last element.
An example:
reduce_into($array, 3) -> ['00:00:00', '12:00:00', '23:59:59']
Note that the array must be "balanced", that means that when I reduce it into 3 elements it will return the first, the one in the middle and the last one.