Property Lists in LISP Last Updated : 31 Jan, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report In Lisp, every symbol has a property list (plist). When a symbol is created initially its property list is empty. A property list consists of entries where every entry consists of a key called an indicator and a value called a property . There are no duplicates among the indicators. In contrast to association lists the operations for adding and removing plist entries alter the plist rather than creating a new one. Function SyntaxUsageget functionget symbol indicator &optional defaultget searched the plist for an indicator equivalent to indicator. If the found value is returned or else the default is returned. If the default is not specified nil is returned.setf function setf((get function) property/value)setf is used with getting to create a new property value pair.symbol-plist(symbol-plist symbol)symbol-plist allows you to see all the properties of a symbolrempropremprop symbol indicatorremprop function is used to remove the property equivalent to the indicator.getfgetf place indicator &optional defaultgetf searches the property list stored in place for an indicator equivalent to an indicator. If one is found, then the corresponding value is returned; otherwise, the default is returned. If the default is not specified, then nil is used for default.remfremf place indicatorremf removes the property equivalent to the given indicator from the given place. Example: Lisp (setf (get 'aastha 'age ) 20) ;using setf (which understands get as a place description) ;to create indicator age with value 20 of symbol aastha. (setf (get 'aastha 'occupation ) 'doctor) ;using setf (which understands get as a place description) ;to create indicator occupation with value doctor of symbol aastha. (setf (get 'aastha 'fav-book ) 'harrypotter) ;using setf (which understands get as a place description) ;to create indicator fav-book with value harrypotter of symbol aastha. (write (symbol-plist 'aastha)) ;using symbol-plist to return aastha(symbol's) plist . (terpri) (remprop 'aastha 'fav-book) ;using remprop to remove property of symbol aastha ;which has indicator fav-book (write (symbol-plist 'aastha)) (terpri) (setq x '()) (setf (getf x 'height ) 20) ;using setf along with getf to set property of ;indicator height as 20 at place x (write(eq(getf x 'height) 20)) ;using eq to check if property of ;indicator height at place x is 20 (terpri) (remf x 'height) ;using remf to remove property ;of indicator height at place x (write(eq(getf x 'height) 20)) Output: (FAV-BOOK HARRYPOTTER OCCUPATION DOCTOR AGE 20) (OCCUPATION DOCTOR AGE 20) T NIL Comment More infoAdvertise with us Next Article Operators in LISP U umakwork1106 Follow Improve Article Tags : LISP LISP-Basics Similar Reads Lists in LISP Lists in common LISP is simply a single Linked list. In LISP, Lists are designed as a chain of records. While talking about record structures in LISP, the concept of Cons is vital. Cons in LISP is a record structure with 2 Â primary components. A cons function takes in 2 arguments and returns a new c 2 min read Operators in LISP Operators are the foundation of any programming language. Thus the functionality of the LISP programming language is incomplete without the use of operators. We can define operators as symbols that help us to perform specific mathematical and logical computations on operands. In other words, we can 5 min read Sets in LISP A set is an unordered collection of items. A set is just like other data structures. In C++ we have a similar data structure called a hash map. Common lisp does not provide a built-in set data type, but it provides a number of functions that allow set operations to be performed onto a list. Using th 7 min read List Manipulation in LISP In this article, we will discuss List manipulation in LISP. The list is a data structure that can store elements of multiple data type we can create a list by using the list function Syntax: (list element1 element2 .................. element n) List manipulating functions are used to manipulate and 3 min read Loops in LISP Loops allow executing a set of instructions repeatedly while some condition is true. LISP provides the following types of loops: 1. dotimes loop: The dotimes loop allows executing instructions for a fixed number of times.Syntax:Â (dotimes( variableName numberOfIterations ) ( expressions )) Where, va 4 min read Input & Output in LISP Pre-requisites: Introduction to LISP Lisp provides a huge set of facilities for performing input/output. All the input/output operations are performed on streams of several kinds. While reading and writing binary data is possible, the majority of Common Lisp input/output methods read or write charac 9 min read Like