From 6c21d7a8c99a0917818e96f50b71ecaba0a26e0c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 26 May 2016 22:12:55 -0700 Subject: Remove superfluous arg defaulting in drop functions. * lib.c (drop_while, drop_until): No need to do default_arg on keyfun, since it is just passed to pos_if, which takes care of it. --- lib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 04b6355d..31301b6d 100644 --- a/lib.c +++ b/lib.c @@ -7829,8 +7829,7 @@ val drop_while(val pred, val seq, val keyfun) case STR: case VEC: { - val key = default_arg(keyfun, identity_f); - val pos = pos_if(notf(pred), seq, key); + val pos = pos_if(notf(pred), seq, keyfun); if (!pos) return make_like(nil, seq); return sub(seq, pos, t); @@ -7862,8 +7861,7 @@ val drop_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, succ(pos), t); -- cgit v1.2.3