I'd prefer if this implementation did not use `cons`, as above