History of 2018-12-16 A simple tip on using destructive functions

2018-12-16
11:46 UTC Revision 1 . . . . Marcin BorkowskiThis is something fairly obvious to every seasoned Lisp programmer, but let’s not forget that there are novices, too. Many Elisp functions are noted to be “destructive”, which means that they can change their arguments. For instance, if you want to sort a list, you may use the sort function, which is said to modify its argument by side effects (this is exactly what “destructive” means). This does not necessarily mean, however, that after executing (sort some-list), the variable some-list will magically contain a sorted version of it previous self! Let’s consider two examples.