from docs in tar.gz:
the simplest (and only other) example is rep.c in librep/srcBut this is only half the story (or less).
" The main thing you'd have to understand is the C representation of Lisp data types. The header file rep_lisp.h defines this, and is reasonably well commented. For each data type there will be at least two macros rep_FOOP (x) which tests if a repv (a lisp pointer) is of type FOO, and rep_FOO (x) which casts the lisp pointer to the correct C pointer.
So, e.g. for pairs, there's rep_CONSP and rep_CONS. There's also accessor macros rep_CAR (x) and rep_CDR (x) for this type.
Another thing is that if a repv == rep_NULL, then an error occurred somewhere, and control should be unwound back to the top-level "