-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 8-Oct-06, at 6:35 PM, Aycan iRiCAN wrote:
Hi,
What is the meaning of '=> symbol used in cond forms?
Best Regards,
In Scheme the form
(cond (X => F) ...)
is equivalent to
(let ((x X)) (if x (F x) (cond ...)))
This is useful when the result of the test (the expression X) is needed in the clause selected. This is frequently used in code like
(cond ((assoc X Y) => cdr) ...)
Marc