Arrays in LISP Last Updated : 26 May, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report LISP, is a list processing, is a programming language widely used in working with data manipulation. LISP allows us to produce single or multiple-dimension arrays using the make-array function. An array can store any LISP object as its elements. The index number of the array starts from 0 to the n-th term. Attributes:The setf attribute gives a call to the function.The aref attribute allows accessing the name of the array and index value.The my-array attribute is used in creating the cells of the array.The dotimes attribute allows looping. Looping start from zero to the nth number defined by the user.The tepri attribute is used to produce a new line,The initial-content attribute is a sequence of nested structures. Example 1: Lisp // Making a file array // lisp to print names (setq myarray (make-array '() :initial-contents '(((Ayush Agarwal) (Piyush Goel)) ((Keshav Kedia) (Gaurav Garg)) )) ) (write myarray) (terpri) Output: Example 2: Lisp // Lisp code for array // Making a file array.lisp // to print number from 10 to 19 . (write (setf my-array (make-array '(10)))) (terpri) (setf (aref my-array 0) 10) (setf (aref my-array 1) 11) (setf (aref my-array 2) 12) (setf (aref my-array 3) 13) (setf (aref my-array 4) 14) (setf (aref my-array 5) 15) (setf (aref my-array 6) 16) (setf (aref my-array 7) 17) (setf (aref my-array 8) 18) (setf (aref my-array 9) 19) (write my-array) Output: Example 3: Lisp // Printing a table for 0 and 1 // using LISP array (setq a (make-array '(2 11))) (dotimes (i 2) (dotimes (j 11) (setf (aref a i j) (list i 'x j '= (* i j))) ) ) (dotimes (i 2) (dotimes (j 11) (print (aref a i j)) ) ) Output: Example 4: Lisp // Making a file array. // lisp to print alphabets from A to Z. (setq myarray (make-array '() :initial-contents '(((a b c) (d e f)) ((g h i) (j k l)) ((m n o) (p q r) (s t u) (v w x y z)) )) ) (write myarray) (terpri) Output: Comment More infoAdvertise with us Next Article Arrays in LISP A ayushcoding100 Follow Improve Article Tags : LISP LISP Arrays Similar Reads Characters in LISP In Lisp data objects of type 'character' are referred to as characters. For representation purposes, we usually denote character objects by preceding a #\ symbol before the character. Any character can be represented by using the #\ symbol before the name of the character. For Example #\a represents 2 min read Atoms in LISP Pre-requisites: Introduction to LISP Function Languages are those languages in which the basic building block is functions. In functional programming, the programmer is concerned only with functionality and not memory related variable storage and assignment sequence. There are some commonly used Fun 2 min read PL/SQL Arrays PL/SQL, an extension of SQL developed through Oracle, empowers builders with robust programming skills for powerful database management. Among its many capabilities, arrays stand out as an essential tool for organizing and manipulating data correctly. In this article, we'll dive deep into the secto 5 min read C++ Arrays In C++, an array is a derived data type that is used to store multiple values of similar data types in a contiguous memory location.Arrays in C++Create an ArrayIn C++, we can create/declare an array by simply specifying the data type first and then the name of the array with its size inside [] squar 10 min read Scala | Arrays Array is a special kind of collection in scala. it is a fixed size data structure that stores elements of the same data type. The index of the first element of an array is zero and the last element is the total number of elements minus one. It is a collection of mutable values. It corresponds to arr 6 min read Like