[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
- Distinguishing `consp` and `functionp`, Stefan Monnier, 2024/01/25
- Re: Distinguishing `consp` and `functionp`, Adam Porter, 2024/01/25
- Re: Distinguishing `consp` and `functionp`, Eli Zaretskii, 2024/01/26
- Re: Distinguishing `consp` and `functionp`, João Távora, 2024/01/26
- Re: Distinguishing `consp` and `functionp`, Stefan Monnier, 2024/01/26
- Re: Distinguishing `consp` and `functionp`,
João Távora <=
- Re: Distinguishing `consp` and `functionp`, Stefan Monnier, 2024/01/26
- Re: Distinguishing `consp` and `functionp`, Daniel Mendler, 2024/01/26
- Re: Distinguishing `consp` and `functionp`, João Távora, 2024/01/27
- Re: Distinguishing `consp` and `functionp`, Po Lu, 2024/01/27
- Re: Distinguishing `consp` and `functionp`, João Távora, 2024/01/27
- Re: Distinguishing `consp` and `functionp`, Richard Stallman, 2024/01/27
Re: Distinguishing `consp` and `functionp`, Stefan Monnier, 2024/01/28