How to make destructive function

For the Compleat Fan
Post Reply
ssqq
Posts: 88
Joined: Sun May 04, 2014 12:49 pm

How to make destructive function

Post by ssqq »

some newLISP builtin function is destructive, If user want design destructive function, how to make it?

for every argument passed into user function is value, not reference only if value is stored in a functor.

TedWalther
Posts: 608
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Re: How to make destructive function

Post by TedWalther »

I suggest, use a macro, or else pass in a symbol, you can alter the value that a symbol points to.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence. Nine months later, they left with a baby named newLISP. The women of the ivory towers wept and wailed. "Abomination!" they cried.

ssqq
Posts: 88
Joined: Sun May 04, 2014 12:49 pm

Re: How to make destructive function

Post by ssqq »

thanks, I think macro may be ok!

Post Reply