diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-06-28 08:50:39 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-06-28 08:50:39 -0700 |
commit | a6a7e5ea61164c2f721fa353c578aeb2688f04a3 (patch) | |
tree | fb5a1f3f71d465c7d44b13b95ae401c7dd50c37b /txr.1 | |
parent | dbcfe10c3a9dc881e1f157582c01074fc60623f4 (diff) | |
download | txr-a6a7e5ea61164c2f721fa353c578aeb2688f04a3.tar.gz txr-a6a7e5ea61164c2f721fa353c578aeb2688f04a3.tar.bz2 txr-a6a7e5ea61164c2f721fa353c578aeb2688f04a3.zip |
doc: parameter of length and empty is "iterable".
* txr.1: In length and empty, don't refer to an "object"
parameter since the syntax calls it "iterable". Simplified
description of length.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 47 |
1 files changed, 4 insertions, 43 deletions
@@ -29262,66 +29262,27 @@ requiring them to be a mixture of characters and strings. .mets (len << iterable ) .syne .desc -If -.meta object -is a sequence, the +The .code length -function returns the number of items it -contains. +function returns the number of items contained in +.metn iterable . The .code len function is a synonym of .codn length . -The function supports these additional types: -.RS -.coIP hash -The value of -.code hash-count -is returned. -.coIP range -The length of the interval -represented by the range is returned. -The length of a range -.code r -is defined as -.codn "(- (to r) (from r))" , -and thus may be negative. -The length of -.code "#R(1 -10)" -is -11 and of -.codn "#R(0.5 3)" , -2.5. - -.coIP buf -The buffer length calculated by -.code length-buf -is returned. -.coIP carray -The number of elements in -.meta object -calculated by -.code length-carray -is returned. -.RE - An attempt to calculate the length of infinite lazy lists will not terminate. Iterable objects representing infinite ranges, such as integers and characters are invalid arguments. -.IP -For all other types, -.code length -throws an error exception. - .coNP Function @ empty .synb .mets (empty << iterable ) .syne .desc If -.meta object +.meta iterable is a suitable argument for the .code length function, then the |