When I write this:
(remove-if #'(lambda (x) (> x 5)) '(3 5 4 6 1 1 8 2))
I get the message:
error: not a function <etc.>
However, when I do it this way:
(defun gt-five (x) (> x 5))
(remove-if #'gt-five '(3 5 4 6 1 1 8 2))
it works, and I get:
(3 5 4 1 1 2)
Can anybody tell me what's going on?
-- Ken
Xcriber51 wrote:
> When I write this:
>
> (remove-if #'(lambda (x) (> x 5)) '(3 5 4 6 1 1 8 2))
>
> I get the message:
>
> error: not a function <etc.>
>
> However, when I do it this way:
>
> (defun gt-five (x) (> x 5))
> (remove-if #'gt-five '(3 5 4 6 1 1 8 2))
>
> it works, and I get:
>
> (3 5 4 1 1 2)
>
> Can anybody tell me what's going on?
Possibly this: CL:REMOVE-IF and CL:> are in the current package, but
CL:LAMBDA has not been imported, or is shadowed by a different symbol.
In article <························@c28g2000cwb.googlegroups.com>,
"Kaz Kylheku" <········@gmail.com> wrote:
> Xcriber51 wrote:
> > When I write this:
> >
> > (remove-if #'(lambda (x) (> x 5)) '(3 5 4 6 1 1 8 2))
> >
> > I get the message:
> >
> > error: not a function <etc.>
> >
> > However, when I do it this way:
> >
> > (defun gt-five (x) (> x 5))
> > (remove-if #'gt-five '(3 5 4 6 1 1 8 2))
> >
> > it works, and I get:
> >
> > (3 5 4 1 1 2)
> >
> > Can anybody tell me what's going on?
>
> Possibly this: CL:REMOVE-IF and CL:> are in the current package, but
> CL:LAMBDA has not been imported, or is shadowed by a different symbol.
To test this, what does
(eq 'lambda 'cl:lambda)
return?
--
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
"Xcriber51" <·······@[OMITTED]> writes:
> When I write this:
>
> (remove-if #'(lambda (x) (> x 5)) '(3 5 4 6 1 1 8 2))
>
> I get the message:
>
> error: not a function <etc.>
>
> However, when I do it this way:
>
> (defun gt-five (x) (> x 5))
> (remove-if #'gt-five '(3 5 4 6 1 1 8 2))
>
> it works, and I get:
>
> (3 5 4 1 1 2)
>
> Can anybody tell me what's going on?
Something strange.
CL-USER[408]> (cl:defpackage "SANE" (:use "COMMON-LISP"))
#<PACKAGE SANE>
CL-USER[409]> (cl:in-package "SANE")
#<PACKAGE SANE>
SANE[410]> (remove-if #'(lambda (x) (> x 5)) '(3 5 4 6 1 1 8 2))
(3 5 4 1 1 2)
SANE[411]>
--
__Pascal Bourguignon__ http://www.informatimago.com/
HEALTH WARNING: Care should be taken when lifting this product,
since its mass, and thus its weight, is dependent on its velocity
relative to the user.
On Mon, 02 Oct 2006 16:12:17 -0400, Xcriber51 wrote:
> When I write this:
>
> (remove-if #'(lambda (x) (> x 5)) '(3 5 4 6 1 1 8 2))
>
> I get the message:
>
> error: not a function <etc.>
>
<snip>
> Can anybody tell me what's going on?
I'm guessing your Lisp implementation is rather severely broken. Which
implementation are you using?
(I've read the other posts thus far. I'm guessing that anyone capable of
jiggering things such that the above is /not/ a bug isn't going to be
asking this question.)
--
My address happens to be com (dot) gmail (at) usenet (plus) chbarts,
wardsback and translated.
It's in my header if you need a spoiler.
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----