wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

To-Do List In LISP

profile
Nareen Ansari
Jul 16, 2025
1 Like
0 Discussions
9 Reads

This program allows a user to manage a simple to-do list. The program does:

  1. Add tasks
  2. View tasks


Program:


(defvar *todo-list* '())


(defun add-task ()

(format t "Enter new task: ")

(let ((task (read-line)))

(push task *todo-list*)

(format t "Task added successfully.~%")))


(defun view-tasks ()

(if (null *todo-list*)

(format t "No tasks in the list.~%")

(progn

(format t "~%--- To-Do List ---~%")

(let ((i 1))

(dolist (task (reverse *todo-list*))

(format t "~A. ~A~%" i task)

(incf i))))))


(defun todo-menu ()

(loop

(format t "~%--- To-Do Menu ---~%")

(format t "1. Add Task~%")

(format t "2. View Tasks~%")

(format t "3. Exit~%")

(format t "Choose an option: ")

(let ((choice (read)))

(case choice

(1 (add-task))

(2 (view-tasks))

(3 (progn (format t "Exiting...~%") (return)))

(t (format t "Invalid option.~%"))))))


;; Start the to-do list manager

(todo-menu)



Output:


Comments ()


Sign in

Read Next

The Essential Guide to Dynamic Arrays vs. Linked Lists: Which to Use and When ?

Blog banner

How to lose belly fat

Blog banner

GIS info about Bermuda Triangle

Blog banner

SECURITY RISKS OF REMOTE WORKING

Blog banner

Overcoming the bedtime brushing Battle with Dr. Roxanne Irani, Dentist in Maroubra

Blog banner

Personalised Name Labels vs. Handwritten Stickers: Which Is Better for Your Child’s School Essentials?

Blog banner

'C', 'C++' and 'Java': Head-to-Head

Blog banner

How return on investment is defined in IT services

Blog banner

Data Visualization in Decision-Making

Blog banner

Cyber Attacks -- Trends Patterns and Security Countermeasures

Blog banner

Understanding Input Based Keylogger Activation Systems: Risks and Mitigation

Blog banner

Digital Forensics Challenges and Tools

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

How College Events Build Real-world Skills You Can’t Learn From Textbooks

Blog banner

Introduction to GIS

Blog banner

Service Design Model

Blog banner

Virtual Memory

Blog banner

SECURITY TOOLS

Blog banner

Protein and Energy: Why Your Workday Diet Needs More of It

Blog banner

This Windows 11 encryption bug may cause data damage

Blog banner

Why Social Search Is Becoming the New Discovery Channel for Brands?

Blog banner

Traditional Unix System

Blog banner

DATA WRANGLING

Blog banner

How social media affect

Blog banner

Is it important to follow all the trends that come up on social media?

Blog banner

From Classic to Flavoured: Exploring Different Types of Khari

Blog banner

Ethical Hacking

Blog banner

I/O Buffering

Blog banner

The Laws of Karma

Blog banner

The Benefits of Practical Life Activities in Preschool

Blog banner

Direct Memory Access

Blog banner

TEAMWORK

Blog banner

File Management In OS

Blog banner

Email Privacy

Blog banner

Data Acquisition in Cyber Forensics

Blog banner

Business Intelligence v/s Big Data

Blog banner

What is process

Blog banner

Jira Software

Blog banner

Philadelphia Experiment : Was it real?

Blog banner

15 Interesting Facts about India

Blog banner

Race Condition in Operating Theatre

Blog banner

BEAUTY IS IN THE EYE OF THE BEHOLDER

Blog banner