Welcome to the CHICKEN Scheme pasting service

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))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Name of the egg which implements this service:
Visually impaired? Let me spell it for you (wav file) download WAV