Re: lisp function questions
- From: tar@xxxxxxxxxxxxx (Thomas A. Russ)
- Date: 30 Sep 2005 09:32:21 -0700
Jon Harrop <usenet@xxxxxxxxxxxxxx> writes:
>
> Pascal Bourguignon wrote:
> >
> > (defun average (list) (and list (/ (reduce (function +) list) (length
> > list))))
>
> Could you elaborate on what you think is incorrect about my average
> function? It was a joke, but I believe it is correct.
I think it hinges on "correct". The general rule of thumb is that if
you find yourself using EVAL when writing a Lisp function then you are
doing something wrong. That goes double for new Lisp users.
--
Thomas A. Russ, USC/Information Sciences Institute
.
- References:
- lisp function questions
- From: dan655t
- Re: lisp function questions
- From: Pascal Bourguignon
- Re: lisp function questions
- From: dan655t
- Re: lisp function questions
- From: Pascal Bourguignon
- lisp function questions
- Prev by Date: Re: Beginner - Function Critique
- Next by Date: Re: macro question
- Previous by thread: Re: lisp function questions
- Next by thread: Re: lisp function questions
- Index(es):