How to make destructive function

For the Compleat Fan

How to make destructive function

Postby ssqq » Fri Jul 15, 2016 9:09 am

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.
ssqq
 
Posts: 88
Joined: Sun May 04, 2014 12:49 pm

Re: How to make destructive function

Postby TedWalther » Fri Jul 15, 2016 8:12 pm

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.
TedWalther
 
Posts: 602
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC

Re: How to make destructive function

Postby ssqq » Sat Jul 16, 2016 10:19 am

thanks, I think macro may be ok!
ssqq
 
Posts: 88
Joined: Sun May 04, 2014 12:49 pm


Return to Anything else we might add?

Who is online

Users browsing this forum: No registered users and 3 guests

cron