pub fn cycle_finding<T>(init: T, f: impl Fn(T) -> T) -> Rhowhere T: Copy + Eq,
循環検出法
Space complexity $O(1)$