summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-07-18 06:59:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-07-18 06:59:56 -0700
commite10f0d60d4203393b4369feac613345ae55075b9 (patch)
treedf920e573c78c736c7c36556858a4c0352c0cbe2 /txr.1
parent0585569fd3754995ef1196959978911c3e4510b5 (diff)
downloadtxr-e10f0d60d4203393b4369feac613345ae55075b9.tar.gz
txr-e10f0d60d4203393b4369feac613345ae55075b9.tar.bz2
txr-e10f0d60d4203393b4369feac613345ae55075b9.zip
find, pos: optimize and support objects properly.
* lib.c (find, pos): Provide specialized behavior based on type and test and key functions. Lists and list-like objects are treated by marching down with cdr. Vectors are traversed with numeric index, as are vector-like objects which exhibit a length function. A special optimization is put in for non-lazy strings which use identity as their key function, and one of the built-in equality operators for the test function: wcschr is used on the underlying C string.
Diffstat (limited to 'txr.1')
0 files changed, 0 insertions, 0 deletions