Might be an abuse of infinite lists. Untested