diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-01-25 15:28:34 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-01-25 15:28:34 -0800 |
commit | 54e007f7e7f71bf93d9744c2c668c61a68b54d46 (patch) | |
tree | cdc26be7dd5346bcc9a441fb6a93c3abca896ac7 /txr.1 | |
parent | a2a18e6a99ddb3770cd0ca7f6afc944cae247565 (diff) | |
download | txr-54e007f7e7f71bf93d9744c2c668c61a68b54d46.tar.gz txr-54e007f7e7f71bf93d9744c2c668c61a68b54d46.tar.bz2 txr-54e007f7e7f71bf93d9744c2c668c61a68b54d46.zip |
doc: some clarifications about dwim brackets.
txr.1: The equivalences between [x i] and some functions like
ref are dynamic; they depend not only on the type ofx, but
also whether i is a range or integer.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -22176,17 +22176,20 @@ argument must be a modifiable string. Direct use of .code chr-str -is equivalent to the DWIM bracket notation except -that +is equivalent to the DWIM bracket notation provided that .meta str -must be a string. The following relation holds: +is a string and +.meta idx +an integer. The following relation holds: .cblk (chr-str-set s i c) --> (set [s i] c) .cble -since -.codn "(set [s i] c) <--> (refset s i c)" , +Since +.code "(set [s i] c) <--> (refset s i c)" +for an integer index +.codn i , this also holds: .cblk @@ -26786,7 +26789,11 @@ The following equivalences hold between .code ref and .codn refset , -and the DWIM bracket syntax: +and the DWIM bracket syntax, provided that +.meta idx +is a scalar index and +.meta seq +is a sequence object, rather than a hash. .cblk (ref seq idx) <--> [seq idx] |