fib-user.s added by adi-lb-phoenix on Wed Jul 17 10:09:13 2024

(import (chicken foreign))

#>
	#include <math.h>
	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))