diff options
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -1440,6 +1440,28 @@ val iter_reset(val iter, val obj) } } +val iterp(val obj) +{ + switch (type(obj)) { + case NIL: + case CHR: + case NUM: + case BGNUM: + case FLNUM: + case CONS: + case LCONS: + return t; + case COBJ: + if (obj->co.cls == seq_iter_cls) + return t; + if (obj_struct_p(obj) && get_special_slot(obj, iter_step_m)) + return t; + /* fallthrough */ + default: + return nil; + } +} + val iter_catv(varg iters) { cnum index = 0; |