diff options
-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)); |