Learnr

Learn Common Lisp

Program in a language where code is data and you can extend the syntax itself.

Free to start. No credit card. Or browse all courses.

What's inside your Common Lisp course

A sample path Learnr builds for Common Lisp. Your real course adapts to your goal and level.

  1. S-expressions, evaluation and the REPL workflow
  2. Lists, cons cells, symbols and core data structures
  3. Functions, closures, LOOP and FORMAT
  4. Macros: backquote, comma and hygiene concerns
  5. CLOS: classes, generic functions and method combination
  6. Conditions and restarts, ASDF systems and Quicklisp libraries

Common Lisp is a standardized, multi-paradigm Lisp with a uniquely interactive workflow: you build programs inside a running image, redefining functions and inspecting objects without restarting. Everything is written as S-expressions, nested lists in parentheses, which is what makes its macros so powerful, since a macro is just a function that transforms code as data. It also has CLOS, an object system with multiple dispatch, and a condition system with restarts. Learnr guides you from first expressions to macros through brief lessons and practice that adapt as you go.

How to learn Common Lisp, step by step

  1. Set up SBCL with an interactive editor. Install SBCL, a fast free compiler, and connect it to an editor through SLIME or SLY in Emacs, or an alternative like the Alive extension for VS Code. The REPL connection is the point, so do not just run files from a terminal.
  2. Learn to read parentheses by structure. Rely on automatic indentation and structural editing rather than counting parentheses. Evaluate small forms like (+ 1 (* 2 3)) and (list 1 2 3) and predict results before pressing enter.
  3. Understand cons cells and symbols. Draw box diagrams for lists built with cons, and practice car, cdr and push. Learn that Common Lisp keeps functions and variables in separate namespaces, which is why you write #'name to pass a function.
  4. Write your first macros carefully. Build a small macro like a while loop or a with-timing form using backquote and comma. Use macroexpand-1 to see the generated code, and gensym to avoid capturing the caller's variables.
  5. Model a domain with CLOS. Define classes with defclass and behavior with defgeneric and defmethod. Try a method that dispatches on two arguments at once, then add :before and :after methods to see method combination in action.
  6. Practice the interactive debugger. Trigger an error and choose a restart from the debugger instead of aborting. Short Learnr review sessions help you remember the condition system vocabulary while you work through a project like a text adventure or a web scraper.

What you'll learn

  • Read and write S-expressions and evaluate them in the REPL
  • Work with cons cells, lists, hash tables and sequences
  • Write macros with backquote and explain when a function is better
  • Define classes and generic functions in CLOS with multiple dispatch
  • Handle errors with conditions, handlers and restarts

How long does it take to learn Common Lisp?

Programmers with some background typically write comfortable Common Lisp in 6 to 10 weeks at about 5 hours a week. Basic syntax arrives in days, while macros and CLOS take longer to use with good judgment. Getting used to the image-based workflow is often the biggest adjustment.

What you need before you start

Prior experience with any programming language is recommended. Willingness to try Emacs or another REPL-connected editor helps, since the interactive environment is central to how Lisp is written.

Common mistakes to avoid

  • Writing macros where a plain function would do. Use a macro only when you must control evaluation or introduce new syntax.
  • Treating the REPL like a script runner and restarting constantly, missing the main benefit of redefining code inside a live image.
  • Using quoted literal lists and then modifying them destructively, which is undefined behavior. Build fresh lists with list or copy-list first.

How Learnr builds your course

Type your topic

Tell Learnr you want to learn Common Lisp, or get as specific as you like.

Get a personalized course

Learnr instantly builds a full Common Lisp course tailored to your goal and skill level.

Learn and level up

Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.

Common Lisp questions, answered

Is Common Lisp worth learning today?

For many people it is worth it for what it teaches: macros, code as data and live interactive development change how you think about programming. It is also used in production for some planning, finance and research systems, though job openings are rare.

What is the difference between Common Lisp, Scheme and Clojure?

Scheme is a minimal Lisp popular in teaching. Common Lisp is a large standardized language with a big built-in library and CLOS. Clojure is a modern Lisp on the JVM that favors immutable data structures.

Which book pairs well with learning Common Lisp?

Practical Common Lisp by Peter Seibel is free to read online and builds real programs. Common Lisp: A Gentle Introduction to Symbolic Computation suits complete beginners.

Explore more courses

More programming and tech courses

See all programming and tech courses

Ready to learn Common Lisp?

Start your free, personalized Common Lisp course in seconds. It will be typed in and ready when you get there.

Start learning Common Lisp

Free to start. No credit card.