[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing Destructive Functions



How can you best write destructive functions?

My understanding of the Lisp wisdom is that the best way is to NOT write
destructive functions. Lisp is a functional language: write functions that
return results. You will also note most (all?) of Common Lisp functions work
that way.
What you could do is:
1/ Write a destructive function (in the CL meaning: compute the result, maybe
destroying the parameters).
2/ Write a macro that calls the function and SETFs a place to the result.
     Daniel.