Skip to content

docs(builtin): expand documentation for integer min/max/clamp - #4166

Merged
bobzhang merged 2 commits into
moonbitlang:mainfrom
0717lee:docs/builtin-int-min-max-clamp
Aug 30, 2026
Merged

bobzhang merged 2 commits into
moonbitlang:mainfrom
0717lee:docs/builtin-int-min-max-clamp

Conversation

@0717lee

@0717lee 0717lee commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Continues #623 (improve comment coverage for builtin).

Int64::min, Int64::max, Int64::clamp, UInt::min, UInt::max and UInt::clamp currently carry one-line comments. These are the only integer types with the min/max/clamp family, so this completes the family's documentation:

  • semantics and parameters
  • return behavior, including the abort when min > max in clamp
  • executable mbt check examples in the existing inspect style

Documentation-only change; no signatures or behavior are affected.

0717lee and others added 2 commits August 30, 2026 11:16
`Int64::min`, `Int64::max`, `Int64::clamp`, `UInt::min`, `UInt::max` and
`UInt::clamp` carried one-line comments while their documented siblings
follow the full structure. Bring all six to the same level: semantics,
parameters, return behavior (including the abort when `min > max` in
`clamp`) and executable examples.

Continues moonbitlang#623
@bobzhang
bobzhang enabled auto-merge (rebase) August 30, 2026 15:18
@bobzhang
bobzhang merged commit 345b73a into moonbitlang:main Aug 30, 2026
20 checks passed
@0717lee
0717lee deleted the docs/builtin-int-min-max-clamp branch September 18, 2026 12:11
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