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

BUFFER OVERFLOW_142

Blog banner

RAID

Blog banner

Esri India launches Policy Maps.

Blog banner

Ransomware

Blog banner

c

Blog banner

Career v/s Job : Choose your passion

Blog banner

Benefits of yoga and meditation

Blog banner

Virtual memory

Blog banner

CSI and Organizational Change

Blog banner

A True Friendship

Blog banner

Why is online marketing is important in current scenario

Blog banner

Embedded Operating System

Blog banner

Virtual machine

Blog banner

What is Password Cracking ? and it's Techniques.

Blog banner

LTE Technology

Blog banner

Explaining Buffer Overflow with Example

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

Malicious softwares

Blog banner

An Overview of Virtual Machines

Blog banner

What are the different types of E-mail crime and process of email forensic?

Blog banner

Scheduling

Blog banner

Gis in agriculture and farming

Blog banner

15 Interesting Facts about India

Blog banner

Cache Memory

Blog banner

Virtualisation

Blog banner

EdTech (Education Technology)

Blog banner

OS Evolution Achievements

Blog banner

Blockchain in IoT Applications

Blog banner

1.1 basic elements

Blog banner

NIKE

Blog banner

Theads

Blog banner

Artificial Intelligence and I

Blog banner

Constrained Management in IT

Blog banner

social media issue

Blog banner

Security requirements for Safe E-Payments

Blog banner

Major achievement

Blog banner

You'll get to know about Pankaj Negi

Blog banner

Process Description

Blog banner

Data carving - using hex editor

Blog banner

Virtual memory in windows

Blog banner

What is OS Fingerprinting?

Blog banner

Types of E-Commerce

Blog banner