wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

To-Do List In LISP

profile
Nareen Ansari
Jul 16, 2025
1 Like
0 Discussions
0 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

Financial Fraud Detection

Blog banner

My favourite food

Blog banner

Safeguarding Your Data: The Importance of Wireless Encryption

Blog banner

Landslide Hazard

Blog banner

Quality check in IT services

Blog banner

Processes : Process description and control

Blog banner

Understanding Mobile Device Forensics

Blog banner

BEAUTY IS IN THE EYE OF THE BEHOLDER

Blog banner

How can denial-of-service(Dos) attacks be prevented?

Blog banner

Multiprocessor

Blog banner

MEMORY MANAGEMENT FILE

Blog banner

Art and Culture of Rajasthan

Blog banner

Telegram and it's features

Blog banner

The Dark Web: A Breeding Ground for Cybercriminals – How to Guard Against Threats

Blog banner

VIRUS

Blog banner

Top 5 Post-Wedding Skin Care Tips

Blog banner

How Reading Books Shape a Child’s Imagination and Thinking?

Blog banner

Modern operating system

Blog banner

rupee

Blog banner

COMMUNICATION

Blog banner

Carrot Pickle With Raisins (lagan Nu Achar)

Blog banner

Network Security Risks

Blog banner

What is Amazon?

Blog banner

The Evolution of the Microprocessor ~ Aditya Pai

Blog banner

IT RISK

Blog banner

Game Theory in Blockchain

Blog banner

The Features of Blockchain

Blog banner

Population

Blog banner

The Memory Hierarchy

Blog banner

OPERATING SYSTEM OBJECTIVES AND FUNCTIONS

Blog banner

5 ways to save money on catering services in Mumbai

Blog banner

JIRA SOFTWARE

Blog banner

Real time scheduling

Blog banner

What if COVID does not exist!

Blog banner

semaphores in os

Blog banner

TECHNOLOGY : BOON OR CURSE ?

Blog banner

DIGITAL TECHNOLOGY

Blog banner

Women empowerment

Blog banner

What do you mean by online marketing and why do you need to know about it

Blog banner

Know your Processors!

Blog banner

Evolution of Operating system

Blog banner

Question

Blog banner