APPLY function problem/strangeness...

APPLY function problem/strangeness...

Anonymous
Not applicable
729 Views
41 Replies
Message 1 of 42

APPLY function problem/strangeness...

Anonymous
Not applicable
Amigos,

I've come across the following AutoLISP strangeness/inconsistency in
R14.01 and ADT2, and I was wondering if any of you could
confirm/duplicate this behavior. Or perhaps clue me in as to if/where
this has been discussed before.

I noticed it whilst trying to program a check on a list of strings to
verify that no member is equivalent to "0" - but it seems that the
problem lies on a deeper level than that.

Here is a snip of my original function, which is supposed to take a
string like "FR10.0/15.0", split it up, then check to make sure it is
formatted correctly. [The function STD-STRTOK splits up a string (in
this case *FSM_STR*) based on a supplied delimeter (in this case the
"/"), and returns a list containing the substrings... IOW, (STD-STRTOK
"10.0/15.0" "/") -> ("10.0" "15.0")] :

(apply 'not (mapcar 'zerop (mapcar 'atof (STD-STRTOK (substr *FSM_STR*
3) "/"))))))

Perhaps there is a much better way to do this, but my point is that
entire construct is throwing out some strange error messages...

IOW, given any list: , I can't get:

(apply 'not )

to work in either R14.01 or ADT2

However, if I use 'null, instead, as in:

(apply 'null )

this DOES work in R14.01 - but NOT in ADT2. (?!)

I thought that just in case the STDLIB functions might *possibly* have
something to do with this, I decided to try it without them loaded up.
As you can see below, this made no difference.

Here are two snips from my command line
(Tried immediately after starting fresh sessions of AutoCAD):

----------------------------------------------------------------
R14.01 Command Line output:

...

Command: ARX

?/Load/Unload/Commands/Options: ?

Loaded Runtime Extension Programs:

acadapp.arx
acmted.arx
autocell.arx
doslib14.arx
livetext.arx
oleaprot.arx
qpik14.arx
toolr14.arx

End of List.

Command: (apply 'NOT '(1 2 3 4 5))
error: too many arguments
(NOT (<> 1) (<> 2) (<> 3)
(<>
#28f3e40> 4) (<> 5))
(APPLY (QUOTE NOT) (QUOTE (1 2 3 4 5)))
*Cancel*

Command: (apply 'NOT (list 1 2 3 4 5))
error: too many arguments
(NOT (<> 1) (<> 2) (<> 3)
(<>
#28f3e40> 4) (<> 5))
(APPLY (QUOTE NOT) (LIST 1 2 3 4 5))
*Cancel*

Command: (apply 'NULL '(1 2 3 4 5))
nil

Command: (apply 'NULL '(nil nil nil nil nil))
T

Command: (apply 'AND '(1 2 3 4 5))
T

Command: (apply 'AND '(1 NIL 3 4 5))
nil

Command: (apply 'OR '(1 NIL 3 4 5))
T

Command: (apply 'OR '(NIL NIL NIL NIL NLI))
nil

----------------------------------------------------------------
ADT2 Command Line output:

...

Command: arx

Enter an option [?/Load/Unload/Commands/Options]: ?

Loaded Runtime Extension Programs:

acadapp.arx - MDI Aware.
acdim.arx - MDI Aware.
aceplotx.arx - MDI Aware.
acetutil.arx - MDI Aware.
achapi15.dbx - MDI Aware.
achlnkui.arx - MDI Aware.
aecstartup.arx - MDI Aware.
appload.arx - MDI Aware.
doslib2k.arx - MDI Aware.
modemacro.arx - MDI Aware.
oleaprot.arx - MDI Aware.
qpik15.arx - MDI Aware.
stdlib15.arx - MDI Aware.
vl.arx - MDI Aware.

End of List.

Command: arx

Enter an option [?/Load/Unload/Commands/Options]: u

Enter ARX/DBX file name to unload: stdlib15.arx

stdlib15.arx successfully unloaded.

Command: (apply 'NOT '(1 2 3 4 5))
; error: too many arguments

Command: (apply 'NOT (list 1 2 3 4 5))
; error: too many arguments

Command: (apply 'NULL '(1 2 3 4 5))
; error: too many arguments

Command: (apply 'NULL '(nil nil nil nil nil))
; error: too many arguments

Command: (apply 'AND '(1 2 3 4 5))
T

Command: (apply 'AND '(1 nil 3 4 5))
nil

Command: (apply 'OR '(1 nil 3 4 5))
T

Command: (apply 'OR '(nil nil nil nil nil))
nil

----------------------------------------------------------------

This is really weird; (apply 'and... , as well as (apply 'or... ,
both work as I would expect, but not (apply 'not... [as well as (apply
'null... in ADT2)]

BTW, my 'puter OS is WinNT4.0 SP4, FWIW, and I'm using a plenty good
machine w/ plenty o' memory for this paltry exercise.

So, first of all, can anyone duplicate/very this behavior?

Is it possible that the problem could be related to one of the other
third party programs I'm using?
(I truly hope that this isn't the case.) Perhaps NOT (and NULL) have
been setq redefined somehow/somewhere? [I'm 99.999% certain my own
programs have not done this.]

If this is indeed an AutoCAD/AutoLISP bug, does anyone have a good
simple workaround for this?

Sorry for the long post, but I hope I have explained this sufficiently
well.

Appreciative of any assistance/feedback tracking down this problemo,
David Kozina
0 Likes
730 Views
41 Replies
Replies (41)
Message 2 of 42

Anonymous
Not applicable
So can anyone tell me what their R14 or AutoCAD 2000
Command Line outputs after each of the following inputs?:

(apply 'not '(1 2 3))

(apply 'null '(1 2 3))

Thanks,
David Kozina
0 Likes
Message 3 of 42

Anonymous
Not applicable
David Kozina escribió en mensaje <852e6h$9o320@adesknews2.autodesk.com>...
>So can anyone tell me what their R14 or AutoCAD 2000
>Command Line outputs after each of the following inputs?:
>
>
>(apply 'not '(1 2 3))
>
>
>(apply 'null '(1 2 3))
>

Acad 2000 (Plain _VERNUM = "T.0.98")

Command: (apply 'not '(1 2 3))
; error: too many arguments

Command: (apply 'null '(1 2 3))
; error: too many arguments

-------------------------------------------------------------

Acad 2000 (included with MDT 4.0 ; _VERNUM = "T.1.33")

Command: (apply 'not '(1 2 3))
; error: too many arguments

Command: (apply 'null '(1 2 3))
; error: too many arguments

------------------------------------------------------------

MDT 4.0 (_VERNUM = "T.1.33")

Command: (apply 'not '(1 2 3))
; error: too many arguments

Command: (apply 'null '(1 2 3))
; error: too many arguments

---------------------------------------

Acad 14 (Spanish ; _VERNUM = "S.0.80" )

Comando: (apply 'not '(1 2 3))
error: demasiados argumentos
(NOT (<> 1) (<> 2) (<> 3))
(APPLY (QUOTE NOT) (QUOTE (1 2 3)))
*Cancelar*

Comando: (apply 'null '(1 2 3))
nil

Eduardo Muñoz
0 Likes
Message 4 of 42

Anonymous
Not applicable
I keep getting "too many arguments" but it is easily fixed by enclosing your
list in TWO sets of parens:

(apply 'not '((1 2 3)))
(apply 'null '((1 2 3)))

"David Kozina" wrote in message
news:852e6h$9o320@adesknews2.autodesk.com...
> So can anyone tell me what their R14 or AutoCAD 2000
> Command Line outputs after each of the following inputs?:
>
>
> (apply 'not '(1 2 3))
>
>
> (apply 'null '(1 2 3))
>
>
> Thanks,
> David Kozina
>
>
0 Likes
Message 5 of 42

Anonymous
Not applicable
Frank, I think what he is trying to do is get a T when an atom in a list is
nil. By nesting the list within another one, he never gets that test. I
think I see what he is getting at.

If you do an (apply 'and '(1 2)) you get T, expected behavior.
If you do an (apply '+ '(1 2)) you get 3, expected behavior.

If you do an (apply 'null '(1 2)) you get error: too many arguments, _why_?

I think this is a good question. This should be a simple way to test valid
atoms in a list, _if it worked_. How would you perform this test yourself?
--
R. Robert Bell, MCSE
Network Administrator & Top Gun
(remove the not. for e-mail)

Frank Oquendo wrote in message
news:852h0a$bq31@adesknews2.autodesk.com...
> I keep getting "too many arguments" but it is easily fixed by enclosing
your
> list in TWO sets of parens:
>
> (apply 'not '((1 2 3)))
> (apply 'null '((1 2 3)))
>
>
> "David Kozina" wrote in message
> news:852e6h$9o320@adesknews2.autodesk.com...
> > So can anyone tell me what their R14 or AutoCAD 2000
> > Command Line outputs after each of the following inputs?:
> >
> >
> > (apply 'not '(1 2 3))
> >
> >
> > (apply 'null '(1 2 3))
> >
> >
> > Thanks,
> > David Kozina
> >
> >
>
>
0 Likes
Message 6 of 42

Anonymous
Not applicable
The why of the matter was so simple, I chided myself for missing it. Apply
is not meant to be used with unary operators. + as well as AND expect
mutiple operands. NOT and NULL expect only one. Here's a little routine to
indicate whether a list contains one or more nil values:

(defun ContainsNil (lst / item retVal)
(foreach item lst
(if (not item) (setq retVal T))
)
retVal
)

"R. Robert Bell" wrote in message
news:852ia5$bq53@adesknews2.autodesk.com...
> Frank, I think what he is trying to do is get a T when an atom in a list
is
> nil. By nesting the list within another one, he never gets that test. I
> think I see what he is getting at.
>
> If you do an (apply 'and '(1 2)) you get T, expected behavior.
> If you do an (apply '+ '(1 2)) you get 3, expected behavior.
>
> If you do an (apply 'null '(1 2)) you get error: too many arguments,
_why_?
>
> I think this is a good question. This should be a simple way to test valid
> atoms in a list, _if it worked_. How would you perform this test yourself?
> --
> R. Robert Bell, MCSE
> Network Administrator & Top Gun
> (remove the not. for e-mail)
0 Likes
Message 7 of 42

Anonymous
Not applicable
In r14 both (not item) and (null item) are supposed to accept only one
argument.
(null) doesn't return an error when supplied with more than one argument (is
it bug?), but evaluates only the first one.

So, I wouldn't use (apply 'null [or 'not] list) in the first place.

to check for zeroes in the list, I would use
(apply 'or (mapcar 'zerop numlist))

--
Adi Buturovic
af.buturovic@berwanger.com
****************************************
Berwanger Inc. is not responsible for any opinion, recommendation,
solicitation, offer or agreement or any information contained in this
communication.

David Kozina wrote in message
news:850j2l$7gc7@adesknews2.autodesk.com...
> Amigos,
>
> I've come across the following AutoLISP strangeness/inconsistency in
> R14.01 and ADT2, and I was wondering if any of you could
> confirm/duplicate this behavior. Or perhaps clue me in as to if/where
> this has been discussed before.
>
> I noticed it whilst trying to program a check on a list of strings to
> verify that no member is equivalent to "0" - but it seems that the
> problem lies on a deeper level than that.
[snip]
0 Likes
Message 8 of 42

Anonymous
Not applicable
Haven't seen you in a while. Did you Enjoy the holidays?

"Michael Puckett" wrote in message
news:852l39$bq413@adesknews2.autodesk.com...
> or ...
>
> (defun HasNil (lst)
> (apply 'or (mapcar 'null lst))
> )
0 Likes
Message 9 of 42

Anonymous
Not applicable
or ...

(defun HasNil (lst)
(apply 'or (mapcar 'null lst))
)

________________________________

puckettm@bantrel.com
> Not < an AutoDESK classroom monitor
Imagination makes all things possible
________________________________

Frank Oquendo wrote in message <852kdq$bq310@adesknews2.autodesk.com>...
The why of the matter was so simple, I chided myself for missing it. Apply
is not meant to be used with unary operators. + as well as AND expect
mutiple operands. NOT and NULL expect only one. Here's a little routine to
indicate whether a list contains one or more nil values:

(defun ContainsNil (lst / item retVal)
(foreach item lst
(if (not item) (setq retVal T))
)
retVal
)
0 Likes
Message 10 of 42

Anonymous
Not applicable
David Kozina wrote:

> I've come across the following AutoLISP strangeness/inconsistency in
> R14.01 and ADT2 ...

You've uncovered a difference between AutoLISP and Visual LISP, which might
be considered a defect in AL.

There are a number of AL functions which are defined as taking one
argument, but do not complain if additional arguments are supplied.
'(null)' is one such function.

When you write:

(apply 'null '(nil T))

you are actually evaluating:

(null nil T)

In AL the NIL argument will be evaluated (returning T) and the T argument
will be ignored. In VL you will receive a "too many arguments" error.

Given that your:

(mapcar 'zerop ...)

code returns a list of NIL or T values and any T value indicates an invalid
value, you should use:

(not (apply 'or (mapcar 'zerop ...)))
--
Frank Whaley
Autodesk, Inc.
few@autodesk.com
http://www.autodesk.com/expresstools
Express Tools - Your wish is our (command ...)
0 Likes
Message 11 of 42

Anonymous
Not applicable
Yes, thanks; hope yours was good.

Been way buzy with web development and haven't been able to play here for weeks; kind of miss this
place.

________________________________

puckettm@bantrel.com
> Not < an AutoDESK classroom monitor
Imagination makes all things possible
________________________________

Frank Oquendo wrote in message <852l5r$bq312@adesknews2.autodesk.com>...
Haven't seen you in a while. Did you Enjoy the holidays?

"Michael Puckett" wrote in message
news:852l39$bq413@adesknews2.autodesk.com...
> or ...
>
> (defun HasNil (lst)
> (apply 'or (mapcar 'null lst))
> )
0 Likes
Message 12 of 42

Anonymous
Not applicable
Well, fellas,

(I'm writing this before I see any additional responses to Robert Bell's
post)

First of all, thanks for verifying this.
Now I'm wondering just what I'm actually trying to do, heh. 😕

Maybe this particular kind of test simply makes no sense.
(Wouldn't be the first time!)

BTW, I tried a couple of other tests using 'null in R14...

Command: (apply 'null '(1 2 3 4 5))
nil

Command: (apply 'null '(1 nil 3 4 5))
nil

Command: (apply 'null '(nil nil 3 4 5))
T

Command: (apply 'null '(nil 3 4 5))
T

It seems obvious now that whatever I'm testing for shouldn't be done
this way!
Apparently, only the *first* member of the list is checked. And even
this doesn't work in ADT2.

What I was looking for was a simple test to check if *any* of the
members in a number list evaluated to zero, and if so, return nil, so
that the subroutine would loop until all members were not zero, so it
looks like maybe I just need to turn things around a bit and use this
test, instead:

(not (apply 'or (mapcar 'zerop )))

So that...

Command: (not (apply 'or (mapcar 'zerop '(1 2 3 4))))
T

Command: (not (apply 'or (mapcar 'zerop '(1 2 0 4))))
nil

Command: (not (apply 'or (mapcar 'zerop '(0 2 2 4))))
nil

Command: (not (apply 'or (mapcar 'zerop '(2 2 4 0))))
nil

Command: (not (apply 'or (mapcar 'zerop '(2 2 4 7))))
T

This accomplishes what I need to do.

Again, thanks for your responses.

Still trying to work on my logic,
David Kozina

PS. Now before posting this, I see several other replys... I thought
so...
Thanks for helping me clear this up, everyone.

R. Robert Bell wrote in message
news:852ia5$bq53@adesknews2.autodesk.com...
> Frank, I think what he is trying to do is get a T when an atom in a
list is
> nil. By nesting the list within another one, he never gets that test.
I
> think I see what he is getting at.
>
> If you do an (apply 'and '(1 2)) you get T, expected behavior.
> If you do an (apply '+ '(1 2)) you get 3, expected behavior.
>
> If you do an (apply 'null '(1 2)) you get error: too many arguments,
_why_?
>
> I think this is a good question. This should be a simple way to test
valid
> atoms in a list, _if it worked_. How would you perform this test
yourself?
> --
> R. Robert Bell, MCSE
> Network Administrator & Top Gun
> (remove the not. for e-mail)
0 Likes
Message 13 of 42

Anonymous
Not applicable
David Kozina escribió en mensaje <852n84$bq79@adesknews2.autodesk.com>...

[...]
>What I was looking for was a simple test to check if *any* of the
>members in a number list evaluated to zero, and if so, return nil, so
>that the subroutine would loop until all members were not zero, so it
>looks like maybe I just need to turn things around a bit and use this
>test, instead:
>
>(not (apply 'or (mapcar 'zerop )))

[...]

well... the apply mapcar thing is 'cute'
but what about this?

(while (member 0 '(1 2 3 0 ))
(do_stuff)
)

The trees don't let you see the forest? 🙂

Eduardo Muñoz
0 Likes
Message 14 of 42

Anonymous
Not applicable
Hola Eduardo,

Well, it all depends on when where and what you're trying to do, I guess...
In this case, in fact, the test happened to be part of a larger test all tied together by an
(and... statement so I needed a T or nil response for that particular test.

However, the larger test was indeed wrapped inside a (while... loop
(variables have additional prefixes in the actual program)
Don't know how efficient it is, but it's ended up like so...
(MS Outlook is probably going to word wrap this into a mess, I'm afraid,
but I hope you get the idea, anyway)

...
(while (and (not STR_OK) CONT_FLG) ; CONT_FLG from earlier test
(setq *STR* (cond ((and *STR* ; *STR* already exist?
(STRINGP *STR*) ; String?
(wcmatch (substr *STR* 1 2) "FC,FS,FR") ; Good Prefix?
(STD-NUMBER-LIST-P ; Number(s) in the Suffix?
(mapcar
'atof
(setq STRLST (STD-STRTOK (substr *STR* 3) "/")))))
(strcat ; If so, then increase
value(s)...
(substr *STR* 1 2) ; and see how well I can guess
(STD-STRLIST->STRING ; the next value...
(mapcar '(lambda (STR) (rtos (+ 0.5 (atof STR)) 2 1)) STRLST)
"/"))))
*STR* (ABE-G$ "Enter Mark Name" *STR* "FC2.0") ; Get String - *STR* is the
default
STR_OK (cond ((wcmatch *STR* "")) ; Quit? -> T
((and (wcmatch (substr *STR* 1 2) "FC,FS,FR") ; Check Prefix again...
(STD-NUMBER-LIST-P ; Number(s) in the Suffix?
(mapcar ; ... If format turns out OK -> T
'atof
(setq STRLST (STD-STRTOK (substr *STR* 3) "/"))))
(not (apply 'or (mapcar 'zerop (mapcar 'atof STRLST)))))) ; <- Look
familiar?
(T ; NO GOOD! Bad Format! BAD I say!
(prompt ; -> nil
(strcat "\n**Invalid Mark Name Value or Format, please try again.**"
"\n[Format Style: FC#, FS#, or FR#/#]"))
(setq *STR* nil)))))
...

Best regards,
David Kozina
0 Likes
Message 15 of 42

Anonymous
Not applicable
I don't know why you need to go through all of that to
detect a nil element in a list.

(apply 'and ) returns T if no element in is nil.

I also don't know where you got the idea that "apply
is not meant to be used with unary operators" either.

There are no such thing as "operators" in LISP. The
apply function cannot be used with special forms
(functions that don't evaluate one or several of their
arguments, such as defun, setq, if, and so on).

Frank Oquendo wrote:
>
> The why of the matter was so simple, I chided myself for missing it. Apply
> is not meant to be used with unary operators. + as well as AND expect
> mutiple operands. NOT and NULL expect only one. Here's a little routine to
> indicate whether a list contains one or more nil values:
>
> (defun ContainsNil (lst / item retVal)
> (foreach item lst
> (if (not item) (setq retVal T))
> )
> retVal
> )
>
> "R. Robert Bell" wrote in message
> news:852ia5$bq53@adesknews2.autodesk.com...
> > Frank, I think what he is trying to do is get a T when an atom in a list
> is
> > nil. By nesting the list within another one, he never gets that test. I
> > think I see what he is getting at.
> >
> > If you do an (apply 'and '(1 2)) you get T, expected behavior.
> > If you do an (apply '+ '(1 2)) you get 3, expected behavior.
> >
> > If you do an (apply 'null '(1 2)) you get error: too many arguments,
> _why_?
> >
> > I think this is a good question. This should be a simple way to test valid
> > atoms in a list, _if it worked_. How would you perform this test yourself?
> > --
> > R. Robert Bell, MCSE
> > Network Administrator & Top Gun
> > (remove the not. for e-mail)

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.tanzillo@worldnet.att.net */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/
0 Likes
Message 16 of 42

Anonymous
Not applicable
> I also don't know where you got the idea that "apply
> is not meant to be used with unary operators" either.

Let's not get hung up on terminology. Regardless of how you want to term it,
apply will not operate correctly with NULL or NOT since they only accept one
argument. (apply 'not '(1 2 3)) is equivalent to (not 1 2 3) which is
clearly incorrect. If you can prove otherwise, I'll eat my hat.
0 Likes
Message 17 of 42

Anonymous
Not applicable
Bravo, Tony, for a simple test. Funny, while I was playing with the (apply
'and . . .) that I didn't glom on to that!

--
R. Robert Bell, MCSE
Network Administrator & Top Gun
(remove the not. for e-mail)

Tony Tanzillo wrote in message
news:38751ADD.731270D8@worldnet.att.net...
> I don't know why you need to go through all of that to
> detect a nil element in a list.
>
> (apply 'and ) returns T if no element in is nil.
>
> I also don't know where you got the idea that "apply
> is not meant to be used with unary operators" either.
>
> There are no such thing as "operators" in LISP. The
> apply function cannot be used with special forms
> (functions that don't evaluate one or several of their
> arguments, such as defun, setq, if, and so on).
>
> Frank Oquendo wrote:
> >
> > The why of the matter was so simple, I chided myself for missing it.
Apply
> > is not meant to be used with unary operators. + as well as AND expect
> > mutiple operands. NOT and NULL expect only one. Here's a little routine
to
> > indicate whether a list contains one or more nil values:
> >
> > (defun ContainsNil (lst / item retVal)
> > (foreach item lst
> > (if (not item) (setq retVal T))
> > )
> > retVal
> > )
> >
> > "R. Robert Bell" wrote in message
> > news:852ia5$bq53@adesknews2.autodesk.com...
> > > Frank, I think what he is trying to do is get a T when an atom in a
list
> > is
> > > nil. By nesting the list within another one, he never gets that test.
I
> > > think I see what he is getting at.
> > >
> > > If you do an (apply 'and '(1 2)) you get T, expected behavior.
> > > If you do an (apply '+ '(1 2)) you get 3, expected behavior.
> > >
> > > If you do an (apply 'null '(1 2)) you get error: too many arguments,
> > _why_?
> > >
> > > I think this is a good question. This should be a simple way to test
valid
> > > atoms in a list, _if it worked_. How would you perform this test
yourself?
> > > --
> > > R. Robert Bell, MCSE
> > > Network Administrator & Top Gun
> > > (remove the not. for e-mail)
>
> --
> /*********************************************************/
> /* Tony Tanzillo Design Automation Consulting */
> /* Programming & Customization for AutoCAD & Compatibles */
> /* ----------------------------------------------------- */
> /* tony.tanzillo@worldnet.att.net */
> /* http://ourworld.compuserve.com/homepages/tonyt */
> /*********************************************************/
0 Likes
Message 18 of 42

Anonymous
Not applicable
Regardless of how you try to spin this, you are wrong.

The statement "apply is not meant to be used with unary
operators" is wrong, regardless of whether one accepts
your contorted description of a function that takes only
a single argument ('unary operator'), or not.

The fact of the matter is that (apply) can be used
with what you call 'unary operators' (such as the
NOT function), but if you supply the wrong number of
arguments in the list, than it is no different than
calling NOT directly, with the wrong number of arguments.

This completely refutes your assertion:

(apply 'not '(nil)) ----------> T

Frank Oquendo wrote:
>
> > I also don't know where you got the idea that "apply
> > is not meant to be used with unary operators" either.
>
> Let's not get hung up on terminology. Regardless of how you want to term it,
> apply will not operate correctly with NULL or NOT since they only accept one
> argument. (apply 'not '(1 2 3)) is equivalent to (not 1 2 3) which is
> clearly incorrect. If you can prove otherwise, I'll eat my hat.

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.tanzillo@worldnet.att.net */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/
0 Likes
Message 19 of 42

Anonymous
Not applicable
No one an ounce of common sense would feed a single member list to apply.
Except maybe for someone trying to save face. Glad to have you back, Mr.
Tanzillo.

Tony Tanzillo wrote in message
news:387536B8.7AD6D4C5@worldnet.att.net...
> Regardless of how you try to spin this, you are wrong.
>
> The statement "apply is not meant to be used with unary
> operators" is wrong, regardless of whether one accepts
> your contorted description of a function that takes only
> a single argument ('unary operator'), or not.
>
> The fact of the matter is that (apply) can be used
> with what you call 'unary operators' (such as the
> NOT function), but if you supply the wrong number of
> arguments in the list, than it is no different than
> calling NOT directly, with the wrong number of arguments.
>
> This completely refutes your assertion:
>
> (apply 'not '(nil)) ----------> T
0 Likes
Message 20 of 42

Anonymous
Not applicable
Frank - It appears that you now think you are infallable.

Well, I'm sorry to have to be the one to deliver this
massive blow to your overblown ego, but here again are
your own words:

"Regardless of how you want to term it, apply will not
operate correctly with NULL or NOT since they only accept
one argument."

You are wrong. I just got done showing that apply does
operate correctly with NOT, contrary to your statement.

You are wrong, got that Frank? As much as you may not
like it, you are wrong.

Frank Oquendo wrote:
>
> No one an ounce of common sense would feed a single member list to apply.
> Except maybe for someone trying to save face. Glad to have you back, Mr.
> Tanzillo.
>
> Tony Tanzillo wrote in message
> news:387536B8.7AD6D4C5@worldnet.att.net...
> > Regardless of how you try to spin this, you are wrong.
> >
> > The statement "apply is not meant to be used with unary
> > operators" is wrong, regardless of whether one accepts
> > your contorted description of a function that takes only
> > a single argument ('unary operator'), or not.
> >
> > The fact of the matter is that (apply) can be used
> > with what you call 'unary operators' (such as the
> > NOT function), but if you supply the wrong number of
> > arguments in the list, than it is no different than
> > calling NOT directly, with the wrong number of arguments.
> >
> > This completely refutes your assertion:
> >
> > (apply 'not '(nil)) ----------> T

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.tanzillo@worldnet.att.net */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/
0 Likes