Skip to content

ssetf #4

Description

Often, I want to refer to the place I'm setting with an anaphora. The code to do this is as follows:

(defmacro ssetf (&rest bindings)
  "Anaphoric setf that binds it to a symbol-macro evaluating to name."
  `(progn
     ,@(loop for (name val &rest _) on bindings by #'cddr
             collect
             `(symbol-macrolet ((it ,name))
                (setf it ,val)))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions