summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-21 19:06:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-21 19:06:18 -0700
commit7576bef6c538103b4cb1cd1c343681dd25b09e1f (patch)
tree6452bcdbd9b51cc1c92e25333f329da9dd17080b
parentf2550c089779356211ca0957883ac8a245923973 (diff)
downloadtxr-7576bef6c538103b4cb1cd1c343681dd25b09e1f.tar.gz
txr-7576bef6c538103b4cb1cd1c343681dd25b09e1f.tar.bz2
txr-7576bef6c538103b4cb1cd1c343681dd25b09e1f.zip
Remove silly use of apply from open-files.
* stream.c (open_files, open_files_star): Refactored.
-rw-r--r--stream.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/stream.c b/stream.c
index 7ffe18c3..ed423dd8 100644
--- a/stream.c
+++ b/stream.c
@@ -3185,9 +3185,7 @@ static val open_files(val file_list, val substitute_stream)
if (nilp(file_list) && substitute_stream) {
return substitute_stream;
} else {
- return apply_intrinsic(func_n0v(make_catenated_stream),
- cons(mapcar(func_n2o(open_file, 1), file_list), nil));
-
+ return make_catenated_stream(mapcar(func_n2o(open_file, 1), file_list));
}
}
@@ -3198,8 +3196,7 @@ static val open_files_star(val file_list, val substitute_stream)
if (nilp(file_list) && substitute_stream) {
return substitute_stream;
} else {
- return apply_intrinsic(func_n0v(make_catenated_stream),
- cons(lazy_mapcar(func_n2o(open_file, 1), file_list), nil));
+ return make_catenated_stream(lazy_mapcar(func_n2o(open_file, 1), file_list));
}
}