wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

To-Do List In LISP

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

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

Meshoo

Blog banner

Severe landslides continue to cause concern in Joshimath, Uttarakhand

Blog banner

BIRYANI ! The history you never knew about

Blog banner

Dangers of Using Public WiFis

Blog banner

A Heartfelt Act of Kindness

Blog banner

Race Condition in Operating Theatre

Blog banner

Memory Management

Blog banner

CYBERBULLYING: Negative comments!

Blog banner

Basic Security For SOAP Services

Blog banner

Threads

Blog banner

What is Spyware? and examples of them.

Blog banner

Vulnerability Assessment (Vulnerability Analysis)

Blog banner

Amazon

Blog banner

I Personally

Blog banner

What is semaphore in operating system?

Blog banner

Assignment-3

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner

Install Ubuntu in Vmware

Blog banner

Cross site scripting Attack

Blog banner

A Traveller’s Guide to Offbeat Places in Arcadia, Florida

Blog banner

What is thread and multithreading ?

Blog banner

Yoga in INDIA and ABROAD

Blog banner

How covid-19 impacted Social media ad spend forecast globally

Blog banner

Protect yourself from System Hacking with these Simple Steps

Blog banner

Atlantis - The Lost Island.........

Blog banner

Synchronization

Blog banner

Rapido

Blog banner

Topic: Sessions in Operating system

Blog banner

Every body is beautiful

Blog banner

File System

Blog banner

OS Evolution Achievements

Blog banner

Service design process in ITSM

Blog banner

RAID and It's Levels

Blog banner

Full Disk Encryption

Blog banner

Importance Of Yoga.

Blog banner

Virtual memory

Blog banner

What does the Australian summer have in store for your oral health?

Blog banner

child Labour

Blog banner

Indian Culture and Tradition

Blog banner

The Secure Software Development Life Cycle (SDLC)

Blog banner

Emailing the merger document

Blog banner