Function calling
This commit is contained in:
@@ -44,6 +44,12 @@ GroundValue createListGroundValue(List in) {
|
||||
return gv;
|
||||
}
|
||||
|
||||
GroundValue createFunctionGroundValue(GroundFunction* in) {
|
||||
GroundValue gv;
|
||||
gv.data.fnVal = in;
|
||||
gv.type = FUNCTION;
|
||||
return gv;
|
||||
}
|
||||
|
||||
GroundValue copyGroundValue(const GroundValue* gv) {
|
||||
GroundValue newGv;
|
||||
@@ -69,6 +75,7 @@ GroundValue copyGroundValue(const GroundValue* gv) {
|
||||
newGv.data.listVal = newList;
|
||||
break;
|
||||
}
|
||||
case FUNCTION: newGv.data.fnVal = gv->data.fnVal; break;
|
||||
case CUSTOM:
|
||||
newGv.data.customVal = gv->data.customVal; // Shallow copy for custom
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user