aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-02-10 08:45:26 -0600
committerColin Okay <okay@toyful.space>2022-02-10 08:45:26 -0600
commitdfff1a5ae35e93e68257eda54411ac89adebd77c (patch)
tree0fd6841b64fd35e042085a74ae882bc6fe344f7b
parentce892522669e953250e350d493417c86bde5ec35 (diff)
added remove-app-state function
-rw-r--r--lazybones.lisp3
-rw-r--r--package.lisp1
2 files changed, 4 insertions, 0 deletions
diff --git a/lazybones.lisp b/lazybones.lisp
index 2a62d91..40eb2f7 100644
--- a/lazybones.lisp
+++ b/lazybones.lisp
@@ -81,6 +81,9 @@
"Update the private app state by key. Key comparison is by EQUAL."
(setf (gethash key (app-state-table app)) value))
+(defun remove-app-state (key &optional (app *app*))
+ "Drops the value of KEY in the app state table, if it exists."
+ (remhash key (app-state-table app)))
(defun expand-provision-app-option (app option value)
(list 'setf
diff --git a/package.lisp b/package.lisp
index 1e7965e..901f569 100644
--- a/package.lisp
+++ b/package.lisp
@@ -45,6 +45,7 @@
#:provision-app
#:app
#:app-state
+ #:remove-app-state
#:canned-response
#:set-canned-response
#:create-server