GNU bug report logs - #19454
24.3; apply doesn't work as in Common Lisp

Previous Next

Package: emacs;

Reported by: sindikat <at> mail36.net (sindikat <at> mail36.net)

Date: Sat, 27 Dec 2014 23:29:01 UTC

Severity: normal

Tags: notabug

Found in version 24.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #7 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: sindikat <at> mail36.net (sindikat <at> mail36.net)
Cc: 19454-done <at> debbugs.gnu.org
Subject: Re: bug#19454: 24.3; apply doesn't work as in Common Lisp
Date: Sat, 27 Dec 2014 20:14:55 -0500
tags 19454 notabug
thanks

> (apply 'mapcar 'list '((1 2))) ; ((1) (2))
> (apply 'mapcar 'list '((1 2) (3 4))) ; error

> The error is:

> *** Eval error ***  Wrong number of arguments: mapcar, 3

Nothing to do with `apply'.  You get the same error with

   (mapcar #'list '(1 2) '(3 4))

That's because Elisp is not Common-Lisp.  If you want Common Lisp's
mapcar, then use `cl-mapcar' (after requiring `cl-lib').


        Stefan




This bug report was last modified 10 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.