Skip to content

Exlpain defvar before setf #10

@amalrkc

Description

@amalrkc

In the section An Informal Introduction to Common Lisp, there is no proper introduction to defvar or defparameter before setf. This leads to undefined variable errors which might confuse new learners. Please include variable definitions in your examples and explain them properly:

(defvar width)
(defvar height)
(setf width 20)
(setf height (* 5 9))
(* width height)
(defvar tax)
(defvar price)
(setf tax (/ 12.5 100))
(setf price 100.50)
(* price tax)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions