Page 1 of 1

How to make destructive function

Posted: Fri Jul 15, 2016 9:09 am
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.

Re: How to make destructive function

Posted: Fri Jul 15, 2016 8:12 pm
by TedWalther
I suggest, use a macro, or else pass in a symbol, you can alter the value that a symbol points to.

Re: How to make destructive function

Posted: Sat Jul 16, 2016 10:19 am
by ssqq
thanks, I think macro may be ok!