Shaka Scheme is a Scheme interpreter constructed in C++ that implements the Scheme programming language standard that is defined in the Revised7 Report on the Algorithmic Language Scheme (R7RS).
Here is some code:
// (+ z1 ...)
Args add_numbers(Args args) {
if (args[0]->get_type() != Data::Type::NUMBER) {
throw TypeException(117,
"STDPROC: Incorrect argument type to Native "
"Procedure: "
"+");
}
shaka::Number result = shaka::Number(0);
for (std::size_t i = 0; i < args.size(); i++) {
result = result + args[i]->get<shaka::Number>();
}
Args result_vector;
NodePtr result_value = create_node(result);
result_vector.push_back(result_value);
return result_vector;
}
Visit the Shaka Scheme GitHub.