Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!corton!ilog!barbes!davis From: davis@barbes.ilog.fr (Harley Davis) Newsgroups: comp.object Subject: Re: Readability of Ada Message-ID: Date: 25 Apr 91 07:40:10 GMT References: <20245@alice.att.com> <1991Apr24.212237.29388@Think.COM> Sender: davis@ilog.fr Organization: ILOG S.A., Gentilly, France Lines: 27 In-reply-to: barmar@think.com's message of 24 Apr 91 21:22:37 GMT In article <1991Apr24.212237.29388@Think.COM> barmar@think.com (Barry Margolin) writes: > ;;; Printing out the radii of circles in a list. > > (defun print-radii (shape-list) > ;; Prints the radii of all the circles in SHAPE-LIST. > (mapc shape-list > (generic-lambda (shape) > method (((shape circle)) > (print (circle-radius shape)))))) Don't you need to define a default method for type shape? Or does EuLisp's GENERIC-LAMBDA automatically define a default method that does nothing? Also, I think you got the arguments to MAPC out of order (or is this a gratuitous incompatibility between EuLisp and Common Lisp?). You are correct on both points. Sorry. EuLisp generally tries to avoid gratuitous imcompatibilities with CommonLisp. -- Harley -- ------------------------------------------------------------------------------ nom: Harley Davis ILOG S.A. net: davis@ilog.fr 2 Avenue Gallie'ni, BP 85 tel: (33 1) 46 63 66 66 94253 Gentilly Cedex, France