Skip to content

Update code examples#902

Merged
lpil merged 2 commits intogleam-lang:mainfrom
giacomocavalieri:assert
Jan 28, 2026
Merged

Update code examples#902
lpil merged 2 commits intogleam-lang:mainfrom
giacomocavalieri:assert

Conversation

@giacomocavalieri
Copy link
Member

@giacomocavalieri giacomocavalieri commented Jan 26, 2026

This PR updates the stdlib code examples:

  • Now they all use assert rather than comments to show expected values (with the exception of functions producing non deterministic values)
  • The assert examples are formatted as if they were formatted by the Gleam formatter (to the best of my ability, something might have slipped! 😁)
  • Now there's always a single assertion per block
  • References to the deprecated list.range have been removed from all doc comments

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jak!!!

@lpil lpil merged commit 659aaac into gleam-lang:main Jan 28, 2026
7 checks passed
@giacomocavalieri giacomocavalieri deleted the assert branch January 28, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants