chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] multiple values in chicken


From: Will Farr
Subject: Re: [Chicken-users] multiple values in chicken
Date: Fri, 1 Feb 2008 11:46:03 -0500

Isn't a call to values completely equivalent to:

(values v1 ...) => (call/cc (lambda (k) (k v1 ...)))

so

(define (values . rest) (call/cc (lambda (k) (apply k rest))))

(which seems like the point that John is making)?  Since call/cc is
free in Chicken, wouldn't this be as fast as any procedure call (well,
any procedure call which involves a procedure with a rest list)?  Why
mess with all the C_values etc?  Or is this some sort of
standards-compliance issue (I see a check for a "values continuation"
in runtime.c)?

Will




reply via email to

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