[circular list] Completed the purely functional Floyd's solution