Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!uwvax!speedy!engber From: engber@speedy.cs.wisc.edu (Mike Engber) Newsgroups: comp.lang.lisp Subject: nested function definitions Summary: what do they do? Message-ID: <5862@spool.cs.wisc.edu> Date: 21 Jun 88 00:27:07 GMT Sender: news@spool.cs.wisc.edu Reply-To: engber@speedy.cs.wisc.edu (Mike Engber) Organization: U of Wisconsin CS Dept Lines: 13 What does nesting function definition do in Common Lisp? For example: (defun cube (x) (defun square (x) (* x x)) (* x (square x))) I saw this style of coding in an article. I played around with it using Allegro Common Lisp (on a Mac) and it seems to create some sort of closure. It also seems to me that this is a more inefficient way to do "PASCAL" style nesting than using FLET. Does anyone what this nesting really does? -ME