diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-13 21:08:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-13 21:08:23 -0700 |
commit | 04083a6ce6e16ed8af92996ab85cd740fd19759a (patch) | |
tree | 6fa05aa0c800dcbf1978fb8d63e02e5f796a146a /txr.1 | |
parent | 9b64a129d691fa3e4a08dacbd6e2c697bb4a857f (diff) | |
download | txr-04083a6ce6e16ed8af92996ab85cd740fd19759a.tar.gz txr-04083a6ce6e16ed8af92996ab85cd740fd19759a.tar.bz2 txr-04083a6ce6e16ed8af92996ab85cd740fd19759a.zip |
ffi: turn carray-sub into accessor.
* lisplib.c (ffi_set_entries): Register carray-sub
for autoload.
* share/txr/stdlib/ffi.tl (carray-sub): New place
macro, aliases to sub. This is not 100% correct since
that means it will admit non-carray objects, but
the alternative is to clone the entire sub expander
with a few changes, or else factor out sub expansion
into a shared routine. Bleh ...
* txr.1: Documented. We don't cover up the ruse we
perpetrated, and reveal that it's just a place macro
targetting sub.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -56928,9 +56928,10 @@ then the expected string conversion semantics applies. Both of these functions return .metn carray . -.coNP Function @ carray-sub +.coNP Accessor @ carray-sub .synb .mets (carray-sub < carray >> [ from <> [ to ]]) +.mets (set (carray-sub < carray >> [ from <> [ to ]]) << new-val ) .syne .desc The @@ -56965,6 +56966,12 @@ can be severed by invoking on the returned object, after which the two no longer share storage, and modifications in the original are not reflected in the subrange. +If +.code carray-sub +is used as a syntactic place, behaves exactly like the +.code sub +accessor, via a place macro substitution to that form. + .coNP Function @ carray-replace .synb .mets (carray-replace < carray < item-sequence >> [ from <> [ to ]]) |