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

Direct Memory Access

Blog banner

Corporate Discipline.

Blog banner

Cloud Security: Trends and Innovations

Blog banner

Elegant fashion style

Blog banner

Satellite Based Positioning

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

Memory

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

Memory Partitioning

Blog banner

Can a Water Flosser Replace Manual Flossing? Here’s What Dentists Say

Blog banner

DATA SCIENCE IN BUSINESS AND MARKETING

Blog banner

“Shot on iPhone” : A campaign by Apple that turned into a prodigy

Blog banner

10 Things To Do On Valentine's Day If You're Single

Blog banner

EMAIL INVESTIGATION

Blog banner

Google App Engine

Blog banner

Microsoft Windows Overview

Blog banner

E-BUSINESS RISK MANAGEMENT

Blog banner

How to Manage Business Invoices and Payments Easily?

Blog banner

Direct Memory Access

Blog banner

Uniprocessor Scheduling

Blog banner

Types of Threads

Blog banner

Big O Notation

Blog banner

Memory Management

Blog banner

Race Conditions

Blog banner

Travelling blog

Blog banner

MODERN OPERATING SYSTEMS

Blog banner

Session Hijacking

Blog banner

Craziness of dream 11 and how it impacts on our life

Blog banner

I/O Buffering

Blog banner

SNAPCHAT

Blog banner

Revolutionary AI Tool: ChatGPT

Blog banner

Windows Operating System

Blog banner

What are NFT s?

Blog banner

Memory Management

Blog banner

EID UL FITR

Blog banner

Open Source Project By Google

Blog banner

Soak knowledge and level up your intellectual potential!!!

Blog banner

10 Unknown facts about India's Independence

Blog banner

Hosting basics

Blog banner

NodeJs

Blog banner

Go Daddy

Blog banner

INDIAN CHEAPEST COSMETICS BRAND

Blog banner