[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] How to structure a project
From: |
Zbigniew |
Subject: |
Re: [Chicken-users] How to structure a project |
Date: |
Wed, 10 Jan 2007 14:54:52 -0600 |
Apropos of nothing, if you surround the body of FAC with (let ((fac
fac)) ...) or even (let loop ((n n)) ...) then you avoid a global
lookup on FAC on every recursive call. This is the same as compiling
the file in block mode, except the latter doesn't work for exported
definitions. This is something most people here probably know, but
it's an interesting optimization trick that took me a while to come
across.
On 1/9/07, Daniel Sadilek <address@hidden> wrote:
(define (fac n)
(if (zero? n)
1
(* n (fac (- n 1))) ) )