1
This commit is contained in:
parent
b6c896a7c5
commit
369587606d
@ -119,9 +119,15 @@ namespace a8
|
||||
[] (const List& params) -> std::shared_ptr<Value>
|
||||
{
|
||||
double result = 0;
|
||||
int i = 0;
|
||||
for (auto param : *params) {
|
||||
Atom&& atom = std::any_cast<Atom>(param->value);
|
||||
result -= atom.val;
|
||||
if (i <= 0) {
|
||||
result = atom.val;
|
||||
} else {
|
||||
result -= atom.val;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return std::make_shared<Value>(Atom(result));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user