Tema Lisp - Dpto. Ciencias de la Computación e Inteligencia Artificial.
Tema Lisp - Dpto. Ciencias de la Computación e Inteligencia Artificial.
Tema Lisp - Dpto. Ciencias de la Computación e Inteligencia Artificial.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Definiciones recursivas<br />
* (TRACE F-1 ... F-N)<br />
> (trace factorial *)<br />
(FACTORIAL *)<br />
> (factorial 2)<br />
1. Trace: (FACTORIAL ’2)<br />
2. Trace: (FACTORIAL ’1)<br />
3. Trace: (FACTORIAL ’0)<br />
3. Trace: FACTORIAL ==> 1<br />
3. Trace: (* ’1 ’1)<br />
3. Trace: * ==> 1<br />
2. Trace: FACTORIAL ==> 1<br />
2. Trace: (* ’2 ’1)<br />
2. Trace: * ==> 2<br />
1. Trace: FACTORIAL ==> 2<br />
2<br />
> (untrace)<br />
(* FACTORIAL)<br />
* (UNTRACE F-1 ... F-N)<br />
IA-I 2003–2004 CcIa Introducción a <strong>Lisp</strong> <strong>Lisp</strong>.25