50 likes | 186 Vues
This guide covers essential LISP functionalities including the 'member' function that checks if an element is present in a list. It also explains the 'nth' function to retrieve the nth element of a list, starting from zero. Additionally, it introduces the debugging facility using the 'trace' function, highlighting the importance of not compiling code when using trace. Finally, learn how to load LISP files with the 'load' command, allowing you to work efficiently with your functions and data.
E N D
(append '(a b c) '(c d e)) (A B C C D E) • LISP defines a function (member EL) that returns non-NIL if E is a member of L. • (nth NL) that returns the N'th member of list L (assuming that the elements are numbered from zero onwards): (nth 0 '(a b c d)) • To better understand the last point, we can make use of the debugging facility trace (do not compile your code if you want to use trace): (trace function)
Making and loading LISP File • (load “mywork.lisp”) • Will load whatever functions are on the file