summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 28c29285..c1be0e29 100644
--- a/lib.c
+++ b/lib.c
@@ -1027,6 +1027,11 @@ val iter_item(val iter)
val item = nil;
return if2(seq_peek(si, &item), item);
}
+ if (obj_struct_p(iter)) {
+ val iter_item_meth = get_special_slot(iter, iter_item_m);
+ if (iter_item_meth)
+ return funcall1(iter_item_meth, iter);
+ }
/* fallthrough */
default:
return car(iter);