diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-05-14 06:30:55 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-05-14 06:30:55 -0700 |
commit | 5db470c24ed43f84ab6915b8f6eea3e53a709f1f (patch) | |
tree | 8e2951924d72efabdb7f9ad8263cca752f62d1c9 /txr.1 | |
parent | cdf79f2907cab5aa410ad47934f0374254386220 (diff) | |
download | txr-5db470c24ed43f84ab6915b8f6eea3e53a709f1f.tar.gz txr-5db470c24ed43f84ab6915b8f6eea3e53a709f1f.tar.bz2 txr-5db470c24ed43f84ab6915b8f6eea3e53a709f1f.zip |
sort: prudently make it subject to compat value
* eval.c (eval_init): If opt_compat is 237 or less, make sort
and shuffle destructive.
* share/txr/stdlib/getopts.tl (opthelp): Revert previous
change, restoring use of copy-list and use nsort instead of
sort, so the function is not affected by the 237 compatibility
being turned on.
* txr.1: Add compatibility notes.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -32632,6 +32632,13 @@ The behavior of .code sort is not specified for hashes whose contents do not conform to this convention. +Note: +.code nsort +was introduced in \*(TX 238. Prior to that version, +.code sort +behaved like +.codn nsort . + .coNP Function @ grade .synb .mets (grade < sequence >> [ lessfun <> [ keyfun ]]) @@ -32719,6 +32726,13 @@ were made using .code copy and then that copy were shuffled in-place and returned. +Note: +.code nshuffle +was introduced in \*(TX 238. Prior to that version, +.code shuffle +behaved like +.codn nshuffle . + .coNP Function @ sort-group .synb .mets (sort-group < sequence >> [ keyfun <> [ lessfun ]]) @@ -73404,6 +73418,12 @@ of these version values, the described behaviors are provided if is given an argument which is equal or lower. For instance .code "-C 103" selects the behaviors described below for version 105, but not those for 102. +.IP 237 +Compatibility values of 237 or lower restore the destructive behavior of the +.code sort +and +.code shuffle +functions. .IP 234 In \*(TX 234 and older versions, the exception throwing functions .code throw |