diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-05 14:40:28 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-05 14:40:28 -0400 |
| commit | c045c54309dfaa7bb11f97dc3f36c595736eca3b (patch) | |
| tree | 52c6b1602adf5d334be6e913273b609d1e88eaa4 /builtins/range.h | |
| parent | 8e2156ac483e7fa0f2007188b670eb11f2a44720 (diff) | |
Add a Range datatype with creation methods like `5:to(10)` and
modification methods like `range:by(2)` or `range:reversed()`
Diffstat (limited to 'builtins/range.h')
| -rw-r--r-- | builtins/range.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/builtins/range.h b/builtins/range.h new file mode 100644 index 00000000..9f3b25af --- /dev/null +++ b/builtins/range.h @@ -0,0 +1,10 @@ +#pragma once + +// Ranges represent numeric ranges + +Range_t Range$reversed(Range_t r); +Range_t Range$by(Range_t r, int64_t step); + +extern const TypeInfo Range; + +// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
