refactor list-take to use let iterate instead of a helper function