Lawrence's cyclic list algo