|
From: | Tobia Conforto |
Subject: | [Chicken-users] Re: (use foo) versus (declare (uses foo)), csi versus csc |
Date: | Sat, 20 Oct 2007 14:44:13 +0200 |
User-agent: | Mutt/1.5.11+cvs20060126 |
Ozzi wrote: > Is there an easy way to write something that can be either compiled > or interpreted I'm not sure this is exactly what you're asking, but I find include most useful: $ cat > bar.scm (define (fac n) (if (zero? n) 1 (* n (fac (- n 1))))) $ cat > foo.scm (include "bar") (write (fac 10)) (newline) $ csi -s foo.scm 3628800 $ csc foo.scm -o foo $ ./foo 3628800 Tobia
[Prev in Thread] | Current Thread | [Next in Thread] |