This contains C++ functions to implement the built-in Lisp functions. The name of the C++ function is the name of the Lisp function with the prefix bi_. Each one takes two parameters, the first is the parameter(s), and the second is the context for evaluation. That first C++ parameter is a a pointer to an evaluable object, which is either the single parameter, or a Pair which is the start of a Lisp list of all the parameters. The parameters have already been evaluated and checked for correct number and type before the the implementation here is called. (That work is done by the apply method of class Builtin.
Have look at the functions; most are small. At least examine the first three, which implement car, cdr and cons. The first two simply select the appropriate field from the parameter object using the car and cdr methods. The cons function allocates a new pair, fills in its two parameters, and returns the pair.
builtin.h
[Download]builtin.cpp
[Download]