aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib.macros.lisp4
-rw-r--r--packages.lisp2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib.macros.lisp b/lib.macros.lisp
index f02e7a2..a866193 100644
--- a/lib.macros.lisp
+++ b/lib.macros.lisp
@@ -83,3 +83,7 @@ arguments `LAMBDA-LIST' with body `BODY'."
sequentially"
`(lambda (x)
(->> x ,@forms)))
+
+(defmacro alist-val (key alist)
+ "Helper macro for getting the value of KEY in ALIST."
+ `(cdr (assoc ,key ,alist)))
diff --git a/packages.lisp b/packages.lisp
index 72d4dc5..977bf66 100644
--- a/packages.lisp
+++ b/packages.lisp
@@ -22,7 +22,7 @@
(:export
:_ :--> :->>
:-> :fn
- :while
+ :while :alist-val
:$))
(defpackage lib.functions