Arrays in LISP Last Updated : 26 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. 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 Basic Syntax in LISP LISP is a list processing programming language. It is widely used in the manipulation of data strings. It provides an input and output library. LISP provides a macro system and provides well control structures for the manipulation of data. Basic Blocks in LISP:There are three basic building blocks o 2 min read Rust - Array An Array in Rust programming is a fixed-sized collection of elements denoted by [T; N] where T is the element type and N is the compile-time constant size of the array. We can create an array in 2 different ways: Simply a list with each element [a, b, c].Repeat expression [N, X].  This will create a 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 One Dimensional Arrays in C In C, an array is a collection of elements of the same type stored in contiguous memory locations. This organization allows efficient access to elements using their index. Arrays can also be of different types depending upon the direction/dimension they can store the elements. It can be 1D, 2D, 3D, 5 min read Bash Scripting - Array Arrays are important concepts in programming or scripting. Arrays allow us to store and retrieve elements in a list form which can be used for certain tasks. In bash, we also have arrays that help us in creating scripts in the command line for storing data in a list format. In this article, we will 7 min read Like