Leanpub Header

Skip to main content

Learning Common Lisp

A Complete Guide to Common Lisp Programming from First Principles to Advanced Metaprogramming

Learning Common Lisp
This book is 100% completeLast updated on 2026-10-06

Discover the power of Common Lisp through a clear, practical guide that takes you from your first S-expression to advanced macros, CLOS and the condition system. Learn not just how Lisp works but why it remains one of the world's most influential programming languages.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
168
Pages
About

About

About the Book

This book takes you from your first S-expression to advanced metaprogramming techniques, covering the full breadth of Common Lisp. You will learn not only how to write Lisp code but why Lisp works the way it does: its design philosophy, its historical roots, and the practical engineering principles that make it one of the most powerful programming languages ever created. Every concept is explained with complete, working code examples built on SBCL, the leading open-source Common Lisp implementation. Whether you are a curious programmer exploring functional and symbolic programming for the first time or an experienced engineer seeking to master macros, CLOS, and Lisp's legendary condition system, this book provides a systematic path from beginner to advanced practitioner.

Author

About the Author

Steve Publications

Steve is a technology professional with over 20 years of experience in software development, server infrastructure, cybersecurity, vulnerability research and reverse engineering. He specializes in analyzing complex systems, identifying weaknesses and improving security.

Beyond his professional work, Steve collaborates with researchers and industry experts to create practical technical books covering software development, cybersecurity, cloud computing, DevOps, AI and enterprise technologies. His goal is to help IT professionals, students and enthusiasts develop practical skills through clear explanations, real-world examples and hands-on exercises.

At Steve Publications, we use AI to assist with translation, proofreading and editing but not to replace the research, technical expertise or hands-on experience behind our books. Some authors publish under pseudonyms for privacy or professional reasons.

Every book is written, reviewed and maintained by experienced professionals, supported by a private community of over 420 engineers and researchers. We prioritize technical accuracy, practical value and regularly updated content over mass-produced AI-generated text.

We welcome experienced professionals interested in writing or reviewing books, especially in specialized and emerging technology fields. If you'd like to contribute, contact us with your area of expertise.

We stand behind our work. If a book doesn't meet your expectations, Leanpub offers a 60-day money-back guarantee.

Contents

Table of Contents

A Complete Guide to Common Lisp Programming from First Principles to Advanced Metaprogramming

Introduction: Why Lisp Still Matters

  1. What You Will Learn
  2. How to Use This Book
  3. The Lisp Mindset

Chapter 1: The Lisp Way of Thinking

  1. A Language That Thought Differently
  2. Code as Data: The Fundamental Insight
  3. Installing Your First Lisp Environment
  4. Reading Your First S-Expression
  5. Interactive Development: The REPL as Your Laboratory

Chapter 2: Core Syntax and Data Structures

  1. Atoms, Symbols and Literals
  2. Lists: The Foundation of Everything
  3. Vectors, Arrays and Hash Tables
  4. Strings and Characters
  5. Type System Overview

Chapter 3: Functions and Control Flow

  1. Defining Functions with DEFUN
  2. Lambda Expressions and Anonymous Functions
  3. Conditionals: IF, COND and, OR, WHEN, UNLESS
  4. Loops: The LOOP Macro and Alternatives
  5. Multiple Values

Chapter 4: Recursion and Higher-Order Programming

  1. Recursive Thinking: From Iteration to Recursion
  2. MAPCAR, REDUCE and Functional Higher-Order Tools
  3. Closures: Functions That Remember
  4. Tail Call Optimization and Efficient Recursion
  5. Building Your Own Higher-Order Utilities

Chapter 5: Lexical Scope and the Environment Model

  1. Lexical Binding and LET Forms
  2. Dynamic Binding and Special Variables
  3. Parameter Passing: Required, Optional, Rest and Keyword Arguments
  4. The Environment Model: How Lisp Resolves Names
  5. Common Scoping Pitfalls and How to Avoid Them

Chapter 6: Macros and Metaprogramming

  1. Why Macros Exist: The Limits of Functions
  2. Your First Macro: DEFMACRO Explained Step by Step
  3. Pattern Matching and Template Writing
  4. Hygienic Concerns and Variable Capture
  5. Real-World Macros: DSLs, Domain-Specific Languages
  6. Advanced Metaprogramming: Compile-Time Computation

Chapter 7: The Common Lisp Object System (CLOS)

  1. Classes and Instances: DEFCLASS and Slot Definitions
  2. Generic Functions and Multiple Dispatch
  3. Method Combination: Beyond Simple Inheritance
  4. The Metaobject Protocol: Programming the Object System
  5. Practical OOP in Lisp: When to Use CLOS

Chapter 8: Error Handling and the Condition System

  1. Conditions vs Exceptions: A Different Model
  2. Signaling Errors and Warnings
  3. Handlers and Restart Functions
  4. Defining Custom Conditions and Restarts
  5. Interactive Debugging with the Condition System

Chapter 9: Packages and Modular Programming

  1. The Package System: Namespaces Done Right
  2. Exporting and Importing: Controlling Visibility
  3. Project Structure for Real Applications
  4. Build Systems: ASDF and Quicklisp
  5. Testing Frameworks: FiveAM and Test Driven Development

Chapter 10: Performance and Optimization

  1. Understanding SBCL’s Compilation Model
  2. Type Declarations: Telling the Compiler What You Know
  3. Profiling and Measuring Performance
  4. Memory Management and Garbage Collection
  5. When to Optimize: Premature Optimization in a Dynamic Language

Chapter 11: Concurrency and Parallelism

  1. Threads in Common Lisp
  2. Synchronization Primitives
  3. Shared State and Race Conditions
  4. Message Passing and Actor-Like Patterns
  5. Parallel Computation: Dividing Work Across Cores

Chapter 12: Building Real Applications

  1. Web Development with Lisp
  2. Database Access and Persistence
  3. Interoperability: Calling C, FFI and Foreign Libraries
  4. Command-Line Tools and Daemons
  5. Modern Development Workflows

Conclusion: The Future of Lisp Thinking

  1. What You Have Learned
  2. Lisp’s Influence on Modern Programming
  3. Why Lisp Remains Relevant
  4. Career Considerations
  5. The Lisp Community
  6. Continuing Your Journey
  7. Final Thoughts

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub