Cond Construct in LISP Read Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report In this article, we will discuss cond construct in LISP. The cond is a decision-making statement used to make n number of test conditions. It will check all the conditions. Syntax: (cond (condition1 statements) (condition2 statements) (condition3 statements) ... (conditionn statements) ) Here, The conditions specify different conditions – if condition1 is not satisfied, then it goes for next condition IE condition until the last condition. The statements specify the work done based on the condition. Note: It will execute only one statement. Example 1: LISP program to check whether a number is greater than 200 or not Lisp ;set value1 to 500 (setq val1 500) ;check whether the val1 is greater than 200 (cond ((> val1 200) (format t "Greater than 200")) (t (format t "Less than 200"))) Output: Greater than 200 Example 2: Demo with comparison operators Lisp ;set value1 to 500 (setq val1 500) ;check whether the val1 is greater than 200 (cond ((> val1 200) (format t "Greater than 200")) (t (format t "Not"))) (terpri) ;check whether the val1 is equal to 500 (cond ((= val1 500) (format t "equal to 500")) (t (format t "Not"))) (terpri) ;check whether the val1 is equal to 600 (cond ((= val1 600) (format t "equal to 500")) (t (format t "Not"))) (terpri) ;check whether the val1 is greater than or equal to 400 (cond ((>= val1 400) (format t "greater than or equal to 400")) (t (format t "Not"))) (terpri) ;check whether the val1 is less than or equal to 600 (cond ((<= val1 600) (format t "less than or equal to 600")) (t (format t "Not"))) Output: Greater than 200 equal to 500 Not greater than or equal to 400 less than or equal to 600 Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now! Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore. Last Updated : 09 Nov, 2021 Like Article Save Article Previous Association Lists in LISP Next Mapping Functions in LISP Share your thoughts in the comments Add Your Comment Please Login to comment...