summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-13 21:08:23 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-13 21:08:23 -0700
commit04083a6ce6e16ed8af92996ab85cd740fd19759a (patch)
tree6fa05aa0c800dcbf1978fb8d63e02e5f796a146a /txr.1
parent9b64a129d691fa3e4a08dacbd6e2c697bb4a857f (diff)
downloadtxr-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.19
1 files changed, 8 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 4aa99e06..451b219c 100644
--- a/txr.1
+++ b/txr.1
@@ -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 ]])