Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

why is this error message comming up?

1 view
Skip to first unread message

eugene kim

unread,
May 27, 2002, 9:37:37 PM5/27/02
to
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


Pierpaolo BERNARDI

unread,
May 27, 2002, 9:58:48 PM5/27/02
to

"eugene kim" <eugen...@hotmail.com> ha scritto nel messaggio news:acun22$3nu$1...@newsreader.mailgate.org...

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.

0 new messages