How do I create a scheme list inside a C function, and return that list? I couldn't find any documentation on this, so I searched through gambit.h and came up with this, which fails to compile due to "___hp" being "undeclared". ___hp seems to be used in the definition of ___CONS. ;;======================================== ;; Is this the correct way to create lists? (c-declare #<<c-declare-end ___SCMOBJ getList () { ___SCMOBJ *a, *b, *c; ___S8 one, two, three; one = 1; two = 2; three = 3; return ___CONS(one, ___CONS(two, ___CONS(three, ___NUL))); } c-declare-end ) (define get-list (c-lambda () scheme-object "getList")) (read) ;So that I can enter the REPL by interrupting the program. ;;======================================== ~ TJay ~