|
Top Document: comp.cad.autocad AutoLISP FAQ (part 1/2) - general Previous Document: [8] Sorting with AutoLISP Next Document: [10] Iteration with MAPCAR,... See reader questions & answers on this topic! - Help others by sharing your knowledge This is not an often asked question but a very interesting one, because LISP itself is defined recursively and it's often the easiest way to articulate hard problems. There some fine documents about recursion at http://xarch.tu-graz.ac.at/autocad/lisp/ especially the http://xarch.tu-graz.ac.at/autocad/lisp/recursive.html tutorial by Dennis Shinn. It explains in great detail: (defun fact (n) (cond ((zerop n) 1) (T (* n (fact (1- n)))))) Note: There's also a self-modifying example of this function explained at http://xarch.tu-graz.ac.at/autocad/lisp/self-mod.lsp User Contributions:Top Document: comp.cad.autocad AutoLISP FAQ (part 1/2) - general Previous Document: [8] Sorting with AutoLISP Next Document: [10] Iteration with MAPCAR,... Part1 - Part2 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: rurban@xarch.tu-graz.ac.at (Reini Urban)
Last Update March 27 2014 @ 02:11 PM
|

Comment about this article, ask questions, or add new information about this topic: