summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-26 22:12:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-26 22:12:55 -0700
commit6480b2210eecf8b29273f900aa4a89583493d9c3 (patch)
tree836056597afd59cf395640ebdc2ac7f18224167b
parent9e441dc12313b4ce17e6203d3719f7116a32169c (diff)
downloadtxr-6480b2210eecf8b29273f900aa4a89583493d9c3.tar.gz
txr-6480b2210eecf8b29273f900aa4a89583493d9c3.tar.bz2
txr-6480b2210eecf8b29273f900aa4a89583493d9c3.zip
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.
-rw-r--r--lib.c6
1 files changed, 2 insertions, 4 deletions
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);