On Wed, Jan 23, 2008 at 11:28:35PM -0800, Brad Beyenhof wrote:
> Yes, normal order attempts to evaluate the operator and all operands
> to primitive values before performing any sort of substitution. Since
> (p) always evaluates back to (p) (a non-primitive), that is why it
> will hang.

(define (p) (p))

I guess this like this Python function...


def p():
    return p()

Or this C function...

??? p() {
                return p();
}

In Scheme it will run forever (tail recursion yay!).  In Python and C it will
eventually blow the stack.

I didn't really feel comfortable that I understood it until I saw it in my old
friends Python and C. :)
cs

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to