Structures in LISP Last Updated : 29 May, 2022 Comments Improve Suggest changes Like Article Like Report LISP, is a list processing, is a programming language widely used in working with data manipulation. Structures are used defines data types, that have the ability to combine with another data type to complete the given task. Attribute used: The defstruct attribute is used to create an instance of a structure.The setf attribute is a macro that calls the function.The setq attribute store the variable.The terpri attribute to produce a new line.Example 1: Lisp /* LISP Creating a book.lisp file to /* store the information of book. (defstruct book title author book-id ) ( setq book1 (make-book :title "Geek Programming" :author "Ayush Agarwal" :book-id "101") ) ( setq book2 (make-book :title "Harry Potter" :author "J. K.Rowling" :book-id "102") ) (write book1) (terpri) (write book2) (setq book3( copy-book book1)) (setf (book-book-id book3) 100) (terpri) (write book3) Output: Example 2: Lisp /* Creating a Staff.lisp file to store /* the information of Staff working in a company. (defstruct Staff employee salary Pin-code ) ( setq employee1 (make-Staff :employee "Rahul Raj" :salary "20 thousand" :Pin-code "700055") ) ( setq employee2 (make-Staff :employee "Dhruv Rathee" :salary "10 thousand" :Pin-code "400020") ) (write employee1) (terpri) (write employee2) (setq employee3( copy-Staff employee1)) (setf (Staff-Staff-id employee3) 100) (terpri) Output: Comment More infoAdvertise with us Next Article Structures in LISP A ayushcoding100 Follow Improve Article Tags : LISP LISP-Basics Similar Reads Program Structure in LISP The expressions we use in Lisp are known as the s-expressions which are composed of atoms, strings, and lists. An s-expression is itself a valid program. REPL:REPL is an acronym for Read Evaluate Print Loop. In the case of an interpreter, the program is read, checked for errors in loops, and the val 2 min read Structures in MATLAB In MATLAB, structures are a way to group related data, where different data have different data types. These different data types are stored as fields inside a data container created by the struct command. A struct could have any number of fields ranging from 0 to indefinite. The structs could be 1- 3 min read Sequences in LISP In Lisp, the ordered set of elements is represented by sequences. All the functionality we use in sequences is applied on vectors and lists which are two of the subtypes of sequences. Creating a Sequence:The generic function for creating a Sequence in Lisp is: ;The generic function for creating a Se 7 min read Recursion in LISP In the Lisp programming language, recursion is a commonly used technique for solving problems. Lisp is a functional programming language, which means it is well-suited to recursive solutions. In LISP, recursion is a programming technique in which a function calls itself repeatedly until a certain co 4 min read Tree in LISP A tree is a non-linear hierarchical data structure that consists of nodes that are connected by edges. Tree stores data in a non-sequential manner so that operations like addition, deletion, updating, or searching could be performed in much less time than what it would take in linear data structures 5 min read Like