diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-30 06:30:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-30 13:30:45 -0700 |
commit | 4aac1a2a6144d04a047966e295727258bd09a734 (patch) | |
tree | 715b3e220b5e1501979fd71a94f8767cfaa5a2f6 | |
parent | f69bc0426a3f94318ef89dba18cdad3cbed180e7 (diff) | |
download | txr-4aac1a2a6144d04a047966e295727258bd09a734.tar.gz txr-4aac1a2a6144d04a047966e295727258bd09a734.tar.bz2 txr-4aac1a2a6144d04a047966e295727258bd09a734.zip |
* lib.c (sel): Bugfix: not implemented correctly for sequences
which are lists.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib.c | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2014-06-30 Kaz Kylheku <kaz@kylheku.com> + + * lib.c (sel): Bugfix: not implemented correctly for sequences + which are lists. + 2014-06-28 Kaz Kylheku <kaz@kylheku.com> * arith.c (bit): New function. @@ -5576,10 +5576,8 @@ val sel(val seq_in, val where_in) for (; seq && where; seq = cdr(seq), idx = plus(idx, one)) { val wh; - do { - wh = car(where); - where = cdr(where); - } while (lt(wh, idx)); + for (; where && lt(wh = car(where), idx); where = cdr(where)) + ; /* empty */ if (eql(wh, idx)) ptail = list_collect (ptail, car(seq)); |