From: eugene kim
Subject: why is this error message comming up?
Date: 
Message-ID: <acun22$3nu$1@newsreader.mailgate.org>
hi all..

the error message only comes up for the first use of function(map)
and it actually gives correct answer...
------------------
Warning: Function called with two arguments, but wants at least three.
(10 2.4 11.6 83)
------------------

(defun map (proc items)
  (if (null items)
      nil
    (cons (funcall proc (car items))
          (map proc (cdr items)))))

(map #'abs (list -10 2.4 -11.6 83))

thank you
From: Pierpaolo BERNARDI
Subject: Re: why is this error message comming up?
Date: 
Message-ID: <svBI8.94807$zW3.1577300@news1.tin.it>
"eugene kim" <··········@hotmail.com> ha scritto nel messaggio ·················@newsreader.mailgate.org...
> hi all..
>
> the error message only comes up for the first use of function(map)
> and it actually gives correct answer...
> ------------------
> Warning: Function called with two arguments, but wants at least three.
> (10 2.4 11.6 83)
> ------------------
>
> (defun map (proc items)
>   (if (null items)
>       nil
>     (cons (funcall proc (car items))
>           (map proc (cdr items)))))
>
> (map #'abs (list -10 2.4 -11.6 83))

Because there's already a system defined function called MAP
and you are redefining it.  In your function application (MAP PROC ...)
the compiler thinks that you are calling the system supplied MAP.

P.