emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distinguishing `consp` and `functionp`


From: João Távora
Subject: Re: Distinguishing `consp` and `functionp`
Date: Fri, 26 Jan 2024 21:50:26 +0000

On Fri, Jan 26, 2024 at 9:13 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > Is fine and correct, but:
> >
> > (funcall '(lambda ()))
> >
> > Shouldn't be fine, yet it is.
>
> That is related but I'm not really interested in disallowing it.

Hmmm

> Rather I'm annoyed at the corner cases where
>
>     (functionp (mapcar ...))
>
> can occasionally return t, simply because the returned list happens to
> start with the symbol `closure` or `lambda`.

So you want this to return nil, but still allow 'funcall' of
said returned lists?

Or do you want to disallow

   (funcall (list 'lambda nil))

But still allow

   (funcall (quote (lambda ())))

?

FWIW, SBCL disallows both.  I think Allegro CL allows at least
one of them.

João



reply via email to

[Prev in Thread] Current Thread [Next in Thread]