about summary refs log tree commit diff
path: root/lisp/klatre/klatre.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/klatre/klatre.lisp')
-rw-r--r--lisp/klatre/klatre.lisp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/klatre/klatre.lisp b/lisp/klatre/klatre.lisp
index 50cc510502e8..1c8d4c4d2e5b 100644
--- a/lisp/klatre/klatre.lisp
+++ b/lisp/klatre/klatre.lisp
@@ -94,3 +94,13 @@ separated by SEP."
   (check-type str string)
   (handler-case (parse-integer str)
     (sb-int:simple-parse-error (_) nil)))
+
+;;;
+;;; Function utilities
+;;;
+
+(defun partial (f &rest args)
+  "Return a function that calls F with ARGS prepended to any remaining
+  arguments"
+  (lambda (&rest more-args)
+    (apply f (append args more-args))))