1 / 4

Introduction to LISP: Member Function, Nth Element, and Debugging Techniques

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.

dieter
Télécharger la présentation

Introduction to LISP: Member Function, Nth Element, and Debugging Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LISP

  2. (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)

  3. Recursions and Conditionals

  4. Making and loading LISP File • (load “mywork.lisp”) • Will load whatever functions are on the file

More Related