add utility functions
This commit is contained in:
@@ -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)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user