Skip to content

Clarify the return value and indexing of List.pop_at/3 - #16082

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:docs/list-pop-at-return-value
Nov 8, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:docs/list-pop-at-return-value

Conversation

@preciz

@preciz preciz commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

The List.pop_at/3 description says an out-of-bounds index returns the original list, but it returns {default, list}.

Rewrite the description to explain the tuple return value, zero-based and negative indices, and the default used for out-of-bounds indices.

Assisted-by: Codex CLI:GPT 6.1 Sol

@josevalim
josevalim merged commit 8c7bb1f into elixir-lang:main Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants