diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-03-07 19:45:01 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-03-07 19:45:01 -0800 |
commit | fe1d0cb216b54a511ab9e3dc4f41b3ce09075997 (patch) | |
tree | 88c81759b5ba2efee3307509d4750523a5769283 /configure | |
parent | b5d92c7b65b7c8efd3c62da070b52326989dfe0b (diff) | |
download | txr-fe1d0cb216b54a511ab9e3dc4f41b3ce09075997.tar.gz txr-fe1d0cb216b54a511ab9e3dc4f41b3ce09075997.tar.bz2 txr-fe1d0cb216b54a511ab9e3dc4f41b3ce09075997.zip |
New function: rangeref.
Because ranges can be iterated like sequences, and are
identified as vector-like, they have to support indexing.
However, ranges already have semantics as a function:
with a sequence argument, they slice it.
Let's put the semantics into a function called rangeref,
so it can be coherently documented.
* eval.c (eval_init): Register rangeref intrinsic.
* lib.c (generic_funcall): Range as a function works in
terms of rangeref.
(ref): Handle RNG case via rangeref.
(rangeref): New function.
* lib.h (rangeref): Declared.
* tests/012/seq.tl: New tests.
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions