gdata.io.handleScriptLoaded({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$georss":"http://www.georss.org/georss","xmlns$thr":"http://purl.org/syndication/thread/1.0","xmlns$blogger":"http://schemas.google.com/blogger/2008","id":{"$t":"tag:blogger.com,1999:blog-913600556879440043"},"updated":{"$t":"2024-01-01T15:38:08.302+05:30"},"category":[{"term":"Data Structures"},{"term":"Vedic Mathematics"},{"term":"My Vlogs"},{"term":"Website Designing"},{"term":"Guest Blogging"},{"term":"Youtube"},{"term":"PPL"},{"term":"Android"},{"term":"Android App Development"},{"term":"High Performance Computing"},{"term":"Socket Programming"},{"term":"Java"},{"term":"Cloud Computing"},{"term":"Unboxing \u0026 Review"},{"term":"Database"},{"term":"OpenMPI"},{"term":"OPENCL"},{"term":"CUDA"},{"term":"LEX \u0026 YACC"},{"term":"Vocabulary"},{"term":"Compiler"},{"term":"Blogging Tips"},{"term":"Networking"},{"term":"Linux"},{"term":"Nanded City Pune"},{"term":"Parallel Computing"},{"term":"SDL"},{"term":"Fedora"},{"term":"Udemy Courses"},{"term":"Dia Software"},{"term":"MPI"},{"term":"Multithreading"},{"term":"Computer Networks"},{"term":"Abbreviations in Computer Science"},{"term":"Salesforce"},{"term":"Lisp"},{"term":"YouTube Tips"},{"term":"MS Excel Formulas \u0026 Functions"},{"term":"C Plus Plus Programming"},{"term":"GATE"},{"term":"Mysql"},{"term":"Google Forms"},{"term":"Wine"},{"term":"Swing"},{"term":"Mathematics"},{"term":"SQL"},{"term":"Amazon Links Summary"},{"term":"Thread Pool"},{"term":"General"},{"term":"Amazon Affiliate Program"},{"term":"How To Write Blog"},{"term":"C Programming"},{"term":"Applet"},{"term":"Selenium Automation Testing"},{"term":"Skill Development Lab"},{"term":"OPENMP"},{"term":"Python"},{"term":"Ubuntu"}],"title":{"type":"text","$t":"Computer Revolution (www.comrevo.com)"},"subtitle":{"type":"html","$t":""},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/-/Lisp?alt\u003djson-in-script\u0026max-results\u003d6"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/-/Lisp?alt\u003djson-in-script\u0026max-results\u003d6"},{"rel":"alternate","type":"text/html","href":"http://www.comrevo.com/search/label/Lisp"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"generator":{"version":"7.00","uri":"https://www.blogger.com","$t":"Blogger"},"openSearch$totalResults":{"$t":"1"},"openSearch$startIndex":{"$t":"1"},"openSearch$itemsPerPage":{"$t":"6"},"entry":[{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-1231248540485432336"},"published":{"$t":"2015-05-23T11:38:00.000+05:30"},"updated":{"$t":"2019-02-27T11:19:51.278+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Java"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Lisp"}],"title":{"type":"text","$t":"Common Lisp Programming Tutorial with Examples"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; In this post, we will see Lisp(Dialect: Common Lisp) programming which includes\n Comments, Simple Statements, Defining Variables, Constants, Operators, \nOutput to screen, Input from user, Conditional Statements, Looping \nStatements, Arrays, List Processing, Multi-threading, Arithmetic Shift (ash), Logical AND (logand), Functions along with Example for area of circle.\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e1. What is Lisp?\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Lisp stands for \u003cu\u003e\"List Processing\"\u003c/u\u003e. It was invented by John McCarthy. Lisp is second oldest High-Level \nprogramming language after Fortran. It is in existence from 1958 and it \nis mostly used for Artificial intelligence programming. It uses \n\u003cu\u003efunctional programming paradigm\u003c/u\u003e for programming; i.e. in Lisp, all \nstatements are specified in terms of function calls. Statements are \nwritten in fully parenthesized prefix notation. For e.g. (+ 15 36), (f \nop1 op2), (+ (- 5 3) 4) etc. It has automatic garbage collection. Hence the programmer need not have to explicitly free the dynamically allocated memory. It has a strong support for recursion. That's why, it is widely used in Artificial Intelligence projects. It is also used for programming for Computer Games, Pattern Recognition, Real Time Embedded Systems.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;Lisp has many dialects; but most common dialects are Common Lisp and \nScheme.\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;In this post, I have considered \u003c/span\u003e\u003cu style\u003d\"font-size: large;\"\u003eCommon Lisp \u003c/u\u003e\u003cspan style\u003d\"font-size: large;\"\u003edialect and used \u003c/span\u003e\u003cu style\u003d\"font-size: large;\"\u003eSteel Bank Common Lisp (SBCL) \u003c/u\u003e\u003cspan style\u003d\"font-size: large;\"\u003ecompiler for execution. (Download SBCL from this link \u003c/span\u003e\u003ca href\u003d\"http://www.sbcl.org/platform-table.html\" style\u003d\"font-size: large;\"\u003ehttp://www.sbcl.org/platform-table.html)\u003c/a\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e2. Three basic building blocks of Lisp programs\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e1. Atom (Number or String of continuous characters).\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. name, 2344, parag, jemmy245 etc.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e2. List\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; list is a sequence of atoms or other list enclosed in parenthesis.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u0026nbsp;(+ 5 3), (* 6 (+ 5 3)) etc.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e3. String\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; It is a group of characters in double quotation marks.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. \"I am\u0026nbsp; parag\"\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \"aaaabbbbb$$$$\" \u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e3. Getting sbcl prompt\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; Type sbcl on terminal and press enter, you will get sbcl prompt. It is shown in following screenshot:\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-VvOeyOYKXYk/VnrDcEUzlJI/AAAAAAAACrY/K_8tiEWSa3c/s1600/sbcl-prompt.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-VvOeyOYKXYk/VnrDcEUzlJI/AAAAAAAACrY/K_8tiEWSa3c/s1600/sbcl-prompt.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e4. Putting Comment\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; anything followed by ;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. (write-line \"Hello\")\u0026nbsp;\u0026nbsp; ;this is a comment\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-M-7Kx9UZI3A/VnqwNOCO1CI/AAAAAAAACpc/oTJEzuXzltY/s1600/comment.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-M-7Kx9UZI3A/VnqwNOCO1CI/AAAAAAAACpc/oTJEzuXzltY/s1600/comment.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e5. Simple Statements/Expressions\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eExamples: \u003cb\u003e\u003cbr /\u003e\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(+ 3 2) \u003cu\u003egives 5\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(- 4 6) \u003cu\u003egives -2\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(* 3 17) \u003cu\u003egives 21\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(/ 3 4) \u003cu\u003egives 3/4\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(/ 55 5) \u003cu\u003egives 11\u003c/u\u003e\u003c/span\u003e \u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(+ (* 5 6) 9) \u003cu\u003egives 39\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(/ 10 (- 5 3)) \u003cu\u003egives 5\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/-e8tDuCfDG7k/Vnqxtv9DWFI/AAAAAAAACpo/NyKZw0FQ-jQ/s1600/simple-statements.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" height\u003d\"400\" src\u003d\"https://1.bp.blogspot.com/-e8tDuCfDG7k/Vnqxtv9DWFI/AAAAAAAACpo/NyKZw0FQ-jQ/s400/simple-statements.jpeg\" width\u003d\"155\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e6. Variables\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003c/b\u003eVariables\n are declared by using standard functions(similar to keywords in C/C++) \nas follows:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003eExample: \u003c/span\u003e\u003c/u\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003ci\u003eHere, I have taken 'a' as variable and '3' as value assigned to a.\u003c/i\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defvar a 3)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setf a 3)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setq a 3)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; Data types of variables are decided based on the values assigned to the variables.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003eExamples:\u003c/u\u003e\u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setf a 4)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setq b 7)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(+ a b) \u003cu\u003egives 11\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(- a b) \u003cu\u003egives -3\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defvar c 7)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(+ a c) \u003cu\u003egives 11\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003eNote:\u003c/i\u003e\u003c/u\u003e setf and setq gives warning(not error) that \"variable is not \ndeclared\" but still you can use it. defvar doesn't give \nany warning like setf as it defines the variable.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://2.bp.blogspot.com/-TwiYH52QL3w/Vnq2JnmYBmI/AAAAAAAACp0/SD5jLH105So/s1600/variables.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://2.bp.blogspot.com/-TwiYH52QL3w/Vnq2JnmYBmI/AAAAAAAACp0/SD5jLH105So/s1600/variables.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp; \u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e7. Constants\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; To define a constant(similar to constant in C/C++), use defconstant.\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eExample: (defconstant p 4)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-1fNHMV939rY/Vnq3q4An4nI/AAAAAAAACqA/NOI-j6vBZVI/s1600/defconstant.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://3.bp.blogspot.com/-1fNHMV939rY/Vnq3q4An4nI/AAAAAAAACqA/NOI-j6vBZVI/s1600/defconstant.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u003cbr /\u003e\u003c/b\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e8. Operators\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003ei. Arithmetic operators\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 1) + \u003cu\u003efor addition\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 2) - \u003cu\u003efor subtraction\u003c/u\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 3) * \u003cu\u003efor multiplication\u003c/u\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 4) / \u003cu\u003efor division\u003c/u\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 5) mod \u003cu\u003efor finding modulus\u003c/u\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 6) incf \u003cu\u003eincrement operator\u003c/u\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; e.g. (defvar a 4)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; (incf a) gives 5\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; (defvar b 6)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; (incf b 2) gives 8\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 7) decf \u003cu\u003edecrement operator\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; e.g. (defvar a 7)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; (decf a) gives 6\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; (defvar b 9)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; (decf b 4) gives 5\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-H1beX0Ih6CE/Vnq5qD54B1I/AAAAAAAACqM/7B256mH83J4/s1600/arithmetic-operators.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" height\u003d\"640\" src\u003d\"https://4.bp.blogspot.com/-H1beX0Ih6CE/Vnq5qD54B1I/AAAAAAAACqM/7B256mH83J4/s640/arithmetic-operators.jpeg\" width\u003d\"154\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003eii. Comparison operators\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(\u003d A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(/\u003d A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(\u0026gt; A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(\u0026lt; A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(\u0026gt;\u003d A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(\u0026lt;\u003d A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(max A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(min A B)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/--wy42357x7U/Vnq9N-9pK4I/AAAAAAAACqg/sPIEYpYmot4/s1600/comparison-operators.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/--wy42357x7U/Vnq9N-9pK4I/AAAAAAAACqg/sPIEYpYmot4/s1600/comparison-operators.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003eiii. Logical operators\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eif A\u003dNIL B\u003d5\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ethen\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(and A B) \u003cu\u003ereturns NIL\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(or A B) \u003cu\u003ereturns 5\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(not A) \u003cu\u003ereturns T\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(not B) \u003cu\u003ereturns NIL\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-8CAN9TyoK7o/Vnq-ssoyteI/AAAAAAAACqs/eImg9NLJteY/s1600/logical-opearators.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-8CAN9TyoK7o/Vnq-ssoyteI/AAAAAAAACqs/eImg9NLJteY/s1600/logical-opearators.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u0026nbsp;\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e9. Showing Output on the screen (just like printf() in C Language)\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e1. To print a value of a variable (Use print or write function)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u0026nbsp; (defvar a 7)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(print a) \u003cu\u003ereturns 7\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write a) \u003cu\u003ereturns 7\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/-U-qTFzPgaoA/Vnq_6q_Kd-I/AAAAAAAACq4/ITYN8XOjl34/s1600/print-value.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-U-qTFzPgaoA/Vnq_6q_Kd-I/AAAAAAAACq4/ITYN8XOjl34/s1600/print-value.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e2. To print a line (Use write-line function)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. (write-line \"This is a Line\") \u003cu\u003ereturns \"This is a Line\". \u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-_dzbj_6mniQ/VnrAwHlNjRI/AAAAAAAACrA/_vlRRkBW38s/s1600/write-line.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://3.bp.blogspot.com/-_dzbj_6mniQ/VnrAwHlNjRI/AAAAAAAACrA/_vlRRkBW38s/s1600/write-line.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e10. Taking input from the user (just like scanf() in C)\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; Use standard function(read) to read a input from user and assign it to some variable.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003ee.g.:\u003c/i\u003e\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defvar a (read))\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/-ksShpk-paZ4/VnrBu8mkMlI/AAAAAAAACrM/iSZxzv76i6s/s1600/input-from-user.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-ksShpk-paZ4/VnrBu8mkMlI/AAAAAAAACrM/iSZxzv76i6s/s1600/input-from-user.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e11. Decisions (Conditional Statements)\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e1.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(cond\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(test1 action1)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(test2 action2)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(testn action n)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/-BN1NOAMyYp4/VnrKc0uLKkI/AAAAAAAACro/_SI6tPC6b2M/s1600/cond.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-BN1NOAMyYp4/VnrKc0uLKkI/AAAAAAAACro/_SI6tPC6b2M/s1600/cond.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e2.\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(if (condition) (action1) (action2))\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/-4cTiFlPrm_w/VnrL3UdY6NI/AAAAAAAACr0/VPsbl4T-_Hs/s1600/if.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-4cTiFlPrm_w/VnrL3UdY6NI/AAAAAAAACr0/VPsbl4T-_Hs/s1600/if.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e3.\n(when (condition) (action1))\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://1.bp.blogspot.com/-X2yOWbpRqW0/VnrNGQ1BY-I/AAAAAAAACsA/j1l2mWM3N3Y/s1600/when.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-X2yOWbpRqW0/VnrNGQ1BY-I/AAAAAAAACsA/j1l2mWM3N3Y/s1600/when.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u003cb\u003e\u0026nbsp;\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e12. Loops (Looping Statements)\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003ei. loop\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defvar a 10)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(loop\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write a)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write-line \" \") \u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setf a (+ a 1)) \u003c/span\u003e \u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(when (\u0026gt; a 17) (return a))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/--5vTl3oQClc/Vnrem92mxdI/AAAAAAAACsQ/ZdBcKmmg2gQ/s1600/loop.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/--5vTl3oQClc/Vnrem92mxdI/AAAAAAAACsQ/ZdBcKmmg2gQ/s1600/loop.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eii. loop for\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(loop for a from 10 to 20\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; do(print a)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-c1Ta_m4v42Q/VnrfjwjLigI/AAAAAAAACsY/FNvL4gTLuLQ/s1600/loopfor.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://3.bp.blogspot.com/-c1Ta_m4v42Q/VnrfjwjLigI/AAAAAAAACsY/FNvL4gTLuLQ/s1600/loopfor.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eiii. dotimes\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(dotimes (n 11)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(print (* n n))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://2.bp.blogspot.com/-UxJ050c16-k/Vnrg5OygG8I/AAAAAAAACsk/0s1rpP7K0TE/s1600/dotimes.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://2.bp.blogspot.com/-UxJ050c16-k/Vnrg5OygG8I/AAAAAAAACsk/0s1rpP7K0TE/s1600/dotimes.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eiv. dolist\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(dolist (n '(1 2 3 4))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(print (* n n))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://2.bp.blogspot.com/-xJ7du6Hmmqc/VnrhCmijLwI/AAAAAAAACss/1dBwAc2cv5g/s1600/dolist.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://2.bp.blogspot.com/-xJ7du6Hmmqc/VnrhCmijLwI/AAAAAAAACss/1dBwAc2cv5g/s1600/dolist.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u003cbr /\u003e\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e13. Array in Lisp\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eTo create array with 10 cells\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. (setf array_example (make-array '(10)))\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Here \u003ci\u003earray_example\u003c/i\u003e is the name of array and \u003ci\u003emake-array\u003c/i\u003e is predefined function used to create an array of specified size (say 10).\u003c/span\u003e \u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eTo set content at particular index\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setf (aref array_example 6) 55)\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; Here \u003ci\u003earef\u003c/i\u003e is predefined function, used to get the element at particular index. \u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eTo access content of 9th cell\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(aref array_example 6)\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-ETyXK9LZyLE/VnriHygN1SI/AAAAAAAACs4/v4mOpeaes4c/s1600/array.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-ETyXK9LZyLE/VnriHygN1SI/AAAAAAAACs4/v4mOpeaes4c/s1600/array.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e14. List Operations\u003cbr /\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(car '(1 2 3 4 5)) \u003cu\u003ereturns 1\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(cdr '(1 2 3 4 5)) \u003cu\u003ereturns (2 3 4 5)\u003c/u\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(car (cdr '(1 2 3 4 5))) \u003cu\u003ereturns 2\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(car (cdr '(a (b c) d e))) \u003cu\u003ereturns (B C)\u003c/u\u003e\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(cons 1 2)\u0026nbsp;\u0026nbsp; \u003cu\u003ereturns (1.2)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(cons 'a 'b) \u0026nbsp; \u003cu\u003ereturns (A.B)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(cons 1 nil)\u0026nbsp; \u003cu\u003ereturns (1)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(car (cons 'a (cons 'b nil)))\u0026nbsp; \u003cu\u003ereturns A\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(cdr (cons 'a (cons 'b nil))) \u003cu\u003ereturns (B)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(list 1 2 3) \u003cu\u003ereturns (1 2 3)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-OfxPaNRWjLg/VnrlYlQTQnI/AAAAAAAACtE/yAVh_oOcEOI/s1600/carcdr.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-OfxPaNRWjLg/VnrlYlQTQnI/AAAAAAAACtE/yAVh_oOcEOI/s1600/carcdr.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003cbr /\u003e\u003c/u\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003eNote:\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; We can combine multiple car and cdr into single word.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eFor e.g.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003ecaar\u003c/u\u003e stands for \u003cu\u003ecar car\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003ecadr\u003c/u\u003e stands for \u003cu\u003ecar cdr\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003ecaaar\u003c/u\u003e stands for \u003cu\u003ecar car car\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003ecdddr\u003c/u\u003e stands for \u003cu\u003ecdr cdr cdr\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003ecaddr\u003c/u\u003e stands for \u003cu\u003ecar cdr cdr\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write cadr '(4 3 2 1)) \u003cu\u003ereturns 3\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write cddr '(4 3 2 1)) \u003cu\u003ereturns (2 1)\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003c/u\u003e\u003c/span\u003e\n\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"http://1.bp.blogspot.com/-svPtRgRI28M/VnKIC8DK1RI/AAAAAAAACoQ/UswT0DTUz5w/s1600/lisp.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-svPtRgRI28M/VnKIC8DK1RI/AAAAAAAACoQ/UswT0DTUz5w/s1600/lisp.jpeg\" /\u003e\u003c/a\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e15. Multi-threading in Lisp\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; In Lisp, threads can be created by following syntax:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. (sb-thread:make-thread(lambda() (write-line \"Hello Parag\")))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003eNote:\u003c/i\u003e\u003c/u\u003e make-thread() is a standard function from package sb.thread which is used to create one thread. If you want to create multiple threads, then call make-thread() multiple times. make-thread() accepts argument lambda() function. lambda() is anonymous function and it is just mentioned to specify contents of a thread.\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://2.bp.blogspot.com/-1_t52kA-Xq0/VnrmbTRTgYI/AAAAAAAACtQ/M7AjYGYWk6s/s1600/thread.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://2.bp.blogspot.com/-1_t52kA-Xq0/VnrmbTRTgYI/AAAAAAAACtQ/M7AjYGYWk6s/s1600/thread.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u0026nbsp;\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e16. Functions in Lisp\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; In Lisp, functions can be defined by following syntax:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defun function_name(arg1,arg2,........,argn)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(statement 1)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(statement 2)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(statement n)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003ee.g.\u003c/i\u003e\u003c/u\u003e\u003c/span\u003e \u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defun add()\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(print (+ 3 2))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; This function can be called as follows:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(add)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://4.bp.blogspot.com/-w-utR3R13j0/Vnrn5ywH61I/AAAAAAAACtc/DWM-z7v-uG0/s1600/function_add.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-w-utR3R13j0/Vnrn5ywH61I/AAAAAAAACtc/DWM-z7v-uG0/s1600/function_add.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Example of function with arguments:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defun product(a b)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(print (* a b) )\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Calling above function:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(product 4 6)\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-0ZDxmjS7EpI/VnroCcmgNbI/AAAAAAAACtk/4UVRwyHhGl8/s1600/function_product.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://3.bp.blogspot.com/-0ZDxmjS7EpI/VnroCcmgNbI/AAAAAAAACtk/4UVRwyHhGl8/s1600/function_product.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e17. Loading functions from a text file\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; To load a function written in any text file, use following syntax:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(load \"file_path/file_name.txt\")\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-Vn8Mw7YsB8U/Vnrpu32CU_I/AAAAAAAACtw/6tqbf5qWCQo/s1600/load.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://3.bp.blogspot.com/-Vn8Mw7YsB8U/Vnrpu32CU_I/AAAAAAAACtw/6tqbf5qWCQo/s1600/load.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-A4tFlvVhy7g/VnrqfUJpuvI/AAAAAAAACt4/ODtcQCHgh0o/s1600/loadmul.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" height\u003d\"170\" src\u003d\"https://3.bp.blogspot.com/-A4tFlvVhy7g/VnrqfUJpuvI/AAAAAAAACt4/ODtcQCHgh0o/s320/loadmul.jpeg\" width\u003d\"320\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e18. Arithmetic Shift (ash)\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; It is used to shift(bitwise) a decimal number.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eSyntax: (ash number no-of-bits-to-be-shifted)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eExample:\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(ash 4 1)\u003c/u\u003e gives \u003cu\u003e8\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(ash 4 -1)\u003c/u\u003e gives \u003cu\u003e2\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(ash 4 2)\u003c/u\u003e gives \u003cu\u003e16\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(ash 13 1)\u003c/u\u003e gives \u003cu\u003e26\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(ash 13 -1)\u003c/u\u003e gives \u003cu\u003e6\u003c/u\u003e\u003c/span\u003e \u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"http://1.bp.blogspot.com/-bQo99fFtDIY/VnKSGvGESUI/AAAAAAAACos/1pNHvZswPi0/s1600/ash.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://1.bp.blogspot.com/-bQo99fFtDIY/VnKSGvGESUI/AAAAAAAACos/1pNHvZswPi0/s1600/ash.jpeg\" /\u003e\u003c/a\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e19. Logical AND Operation (logand)\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u0026nbsp;\u003c/b\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; It is used for binary AND operation between two numbers.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e \u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ci\u003eSyntax:\u003c/i\u003e (logand number1 number2)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ci\u003eExample:\u003c/i\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(logand 6 1)\u003c/u\u003e gives \u003cu\u003e0\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(logand 3 1)\u003c/u\u003e gives \u003cu\u003e1\u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(logand 6 3)\u003c/u\u003e gives \u003cu\u003e2 \u003c/u\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"http://4.bp.blogspot.com/-dVExphW1rLQ/VnocR_14ifI/AAAAAAAACpM/od942i_D53I/s1600/logand.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://4.bp.blogspot.com/-dVExphW1rLQ/VnocR_14ifI/AAAAAAAACpM/od942i_D53I/s1600/logand.jpeg\" /\u003e\u003c/a\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e20. Example: A function to find area of a circle\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(defun areaofcircle()\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write-line \"Enter radius\")\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(setf radius (read))(setf a (* 3.14 radius radius))\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write-line \"Area of circle:\")\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e(write a)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e)\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003eNote:\u003c/i\u003e\u003c/u\u003e Neglect warnings when you execute it from terminal.\u003c/span\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://2.bp.blogspot.com/-G2_xKwuukTM/VnrtKiOqbNI/AAAAAAAACuE/YNItX2lv_lU/s1600/areaofcircle.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://2.bp.blogspot.com/-G2_xKwuukTM/VnrtKiOqbNI/AAAAAAAACuE/YNItX2lv_lU/s1600/areaofcircle.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cdiv class\u003d\"separator\" style\u003d\"clear: both; text-align: center;\"\u003e\n\u003ca href\u003d\"http://3.bp.blogspot.com/-gNln76GR1nE/VnrtYT3niJI/AAAAAAAACuM/g_NGmrJme44/s1600/areaofcircleresult.jpeg\" imageanchor\u003d\"1\" style\u003d\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border\u003d\"0\" src\u003d\"https://3.bp.blogspot.com/-gNln76GR1nE/VnrtYT3niJI/AAAAAAAACuM/g_NGmrJme44/s1600/areaofcircleresult.jpeg\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\n\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003eNext:\u003c/i\u003e\u003c/u\u003e\u0026nbsp;\u003ca href\u003d\"http://comrevo.blogspot.in/2015/05/six-phases-of-compiler-with-example-preprocessor-assembler-linker-loader-lexical-analysis-parser-syntax.html\"\u003eSix phases of Compiler with an Example \u003c/a\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003ci\u003ePrevious:\u003c/i\u003e\u003c/u\u003e\u0026nbsp;\u003ca href\u003d\"http://comrevo.blogspot.in/2015/05/openmp-program-for-n-ary-search-algorithm.html\"\u003eOPENMP program for n-ary search algorithm \u003c/a\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cdiv align\u003d\"center\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/div\u003e\n\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/1231248540485432336/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2015/05/common-lisp-programming-tutorial-with-examples.html#comment-form","title":"3 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/1231248540485432336"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/1231248540485432336"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2015/05/common-lisp-programming-tutorial-with-examples.html","title":"Common Lisp Programming Tutorial with Examples"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https://4.bp.blogspot.com/-VvOeyOYKXYk/VnrDcEUzlJI/AAAAAAAACrY/K_8tiEWSa3c/s72-c/sbcl-prompt.jpeg","height":"72","width":"72"},"thr$total":{"$t":"3"}}]}});