add utility functions

This commit is contained in:
2026-01-05 21:22:19 -05:00
parent 3b3ebf8e31
commit 48ba912d52
6 changed files with 57 additions and 19 deletions

View File

@@ -4,6 +4,8 @@
(in-package :lispostory)
(toggle-pretty-print-hash-table t)
(defun http-get-json (url)
(multiple-value-bind (body status) (drakma:http-request url)
(if (/= status 200)
@@ -36,7 +38,7 @@
(defun maybe-pass (func arg)
"Pass ARG to FUNC if arg is not nil."
(if (equal arg nil)
(if (not (equal arg nil))
(funcall func arg)
(funcall func)))