summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index a0333930..04b6355d 100644
--- a/lib.c
+++ b/lib.c
@@ -7788,6 +7788,7 @@ val take_until(val pred, val seq, val keyfun)
return nil;
case CONS:
case LCONS:
+ keyfun = default_arg(keyfun, identity_f);
return make_lazy_cons(func_f1(cons(seq, cons(pred, keyfun)),
take_until_list_fun));
case LSTR:
@@ -7795,8 +7796,7 @@ val take_until(val pred, val seq, val keyfun)
case STR:
case VEC:
{
- val key = default_arg(keyfun, identity_f);
- val pos = pos_if(pred, seq, key);
+ val pos = pos_if(pred, seq, keyfun);
if (!pos)
return seq;
return sub(seq, zero, succ(pos));