Skip to content

Instantly share code, notes, and snippets.

@MarioAriasC
Created December 11, 2022 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarioAriasC/1ac810fd7148777765439a3a7e3a51e9 to your computer and use it in GitHub Desktop.
Save MarioAriasC/1ac810fd7148777765439a3a7e3a51e9 to your computer and use it in GitHub Desktop.
function evalExpressions(args: ExpressionList, env: Environment): Array<MObject | null> {
const evalList = []
for (const argument of args!!) {
const evaluated = evaluateNode(argument, env)
if (isError(evaluated)) {
return [evaluated]
}
evalList.push(evaluated)
}
return evalList
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment