chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] import and srfi-1


From: Nicolas Pelletier
Subject: Re: [Chicken-users] import and srfi-1
Date: Fri, 23 Jul 2010 08:50:39 +0900

Hello,

you can do it the following way by generating the import module for test.scm:

address@hidden:~/tmp$ cat test.scm
(module test (rev) (import scheme) (import srfi-1)

(require-extension srfi-1)

(define (rev ls) (fold cons '() ls))

)
address@hidden:~/tmp$ cat toto.scm
(require-extension test)
(display (rev (list 1 2 3 4 5))) (newline)
address@hidden:~/tmp$ csc -s -j test test.scm
address@hidden:~/tmp$ csc toto.scm
address@hidden:~/tmp$ ./toto
(5 4 3 2 1)

Regards,

-- 
Nicolas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]