diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-16 06:42:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-16 06:42:00 -0700 |
commit | 6ef95aee02b53e3bba0778ef2a94291c33c21cfb (patch) | |
tree | d08952fab9f44a7653333f2aaca3cce0f8dfefc7 /syslog.h | |
parent | d212fc6284a6b7858da4570ef4d22cb88eec747a (diff) | |
download | txr-6ef95aee02b53e3bba0778ef2a94291c33c21cfb.tar.gz txr-6ef95aee02b53e3bba0778ef2a94291c33c21cfb.tar.bz2 txr-6ef95aee02b53e3bba0778ef2a94291c33c21cfb.zip |
New length method on structures.
With this change, nreverse is possible on a struct,
if it has lambda, lambda-set and length methods.
* lib.c (length_s): New symbol variable.
(length): Check for length method and call it,
in preference to checking for car method and falling
back on cdr-based length.
(empty): If object has a length method, call it and
compare result to zero.
(obj_init): Initialize length_s.
* txr.1: Documented. We now have the concepts of structs
being vector-like sequences or list-like sequences.
Diffstat (limited to 'syslog.h')
0 files changed, 0 insertions, 0 deletions