diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-25 16:47:47 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-25 16:47:47 +0200 |
| commit | 515ce3752b5470ade8cd9f956f9d8f9cc80ac06f (patch) | |
| tree | 1ea4b98d46716ee135981dae52e522624a71006f /cmd | |
| parent | 86286ebe61c5bd0f88689d5d6155f09cc4879821 (diff) | |
docs: Update README.md and godoc for Boolean-to-Number coercion
- Added documentation section to README.md explaining automatic coercion
- Included usage examples: '5 3 == 1 +', '0 false +', 'true 2 *', '9 3 > 4 5 < +'
- Updated Value type godoc to explain coercion behavior (true→1, false→0)
- toNumber() function already had good documentation
The coercion allows boolean results to be used directly in arithmetic operations,
enabling expressions like '5 3 == 1 +' where '5 3 ==' produces false=0, then '0 + 1' produces 1.
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions
