(import (chicken foreign)) #> #include extern int fib(int n); int lshift(int x, int y){ return x << y; } <# (define xfib (foreign-lambda int "fib" int)) (define xsin (foreign-lambda double "sin" double)) (define xcos (foreign-lambda double "cos" double)) (define xlshift (foreign-lambda int "lshift" int int)) (print "fib(10) = " (xfib 10)) (print "sin(0) = " (xsin 0)) (print "cos(0) = " (xcos 0)) (print "xlshift(3, 2) =" (xlshift 3 2))