diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 6e82af1d8..0283a14d6 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1475,10 +1475,10 @@ void EvalState::callFunction(Value & fun, std::span args, Value & vRes, auto makeAppChain = [&]() { vRes = vCur; - for (size_t i = 0; i < args.size(); ++i) { + for (auto arg : args) { auto fun2 = allocValue(); *fun2 = vRes; - vRes.mkPrimOpApp(fun2, args[i]); + vRes.mkPrimOpApp(fun2, arg); } };