diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-12-08 05:39:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-12-08 05:39:16 -0800 |
commit | 30481fc802ec696c930d5e0fa211fb18a1dbfc49 (patch) | |
tree | 428229a2cb00c2eb26b5527c640dc45c10897907 | |
parent | ababc09540fb2fd934d2c3b23f25965319ee6aec (diff) | |
download | txr-30481fc802ec696c930d5e0fa211fb18a1dbfc49.tar.gz txr-30481fc802ec696c930d5e0fa211fb18a1dbfc49.tar.bz2 txr-30481fc802ec696c930d5e0fa211fb18a1dbfc49.zip |
Fix outdated references to .. denoting cons.
* txr.1: Upgrade text under Callable Objects and Operator
dwim.
-rw-r--r-- | txr.1 | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -9901,11 +9901,10 @@ returned. Hashes also work as one or two argument functions, corresponding to the arguments of the gethash function. Moreover, when a sequence is used as a function of one argument, and the -argument is a cons cell rather than an integer, then the call becomes a -two-argument call in which the car and cdr of the cell are passed as separate -arguments. This allows for syntax like +argument is a range object rather than an integer, then the call is equivalent +to the two-argument form. This is the basis for array slice syntax like .cblk -(call "abc" 0..1). +["abc" 0..1] . .cble .B Example 1: @@ -9927,8 +9926,7 @@ and to the corresponding characters of string .strn abc . -Through this function, the list of -integer indices +Through this function, the list of integer indices .code (2 0 1) is taken to the list of characters .codn (#\ec #\ea #\eb) . @@ -9942,8 +9940,8 @@ is taken to the list of characters Here, the shorthand .code 1 .. 3 denotes -.codn (cons 1 3) . -A cons cell as an argument +.codn (rcons 1 3) . +A range used as an argument to a sequence performs range extraction: taking a slice starting at index 1, up to and not including index 3, as if by the call .codn (sub '(1 2 3 4) 1 3) . @@ -11390,14 +11388,14 @@ element position, and shortening the sequence by one. .meIP >> [ sequence << from-index..to-below-index ] Retrieve the specified range of elements. The range of elements is specified in the -.code car +.code from and -.code cdr -fields of a cons cell, -for which the +.code to +fields of a range object. The .code .. -(dotdot) syntactic sugar is useful. -See the section on Range Indexing below. +(dotdot) syntactic sugar denotes it construction via the +.code rcons +function. See the section on Range Indexing below. This form is also a syntactic place, if the .meta sequence |