如何从 Guile 中的 Scheme 函数创建 C 函数指针?

How does one create a C function pointer from a Scheme function in Guile?

我正在尝试为 C 库编写一个包装器,其中包含一个函数,该函数采用另一个函数来实现多态性(即通用函数)。我想编写我的包装器,使其采用 Scheme 函数并将其作为 C 函数指针传递给通用函数。 Guile 是否提供允许我将 Scheme 函数转换为 C 函数指针的功能?

您必须使用 manual 中描述的 procedure->pointer 程序。