do not repeatedly evaluate second argument in for
This commit is contained in:
parent
29d8eda238
commit
e981d6b67f
4
ml.cpp
4
ml.cpp
|
|
@ -948,11 +948,11 @@ namespace builtin {
|
|||
for (size_t i = 0; i < list.size(); i++) {
|
||||
env.set(args[0].as_atom(), list[i]);
|
||||
|
||||
for (size_t j = 1; j < args.size() - 1; j++)
|
||||
for (size_t j = 2; j < args.size() - 1; j++)
|
||||
args[j].eval(env);
|
||||
|
||||
acc = args[args.size() - 1].eval(env);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue