aboutsummaryrefslogtreecommitdiff
path: root/stack-question.el
diff options
context:
space:
mode:
Diffstat (limited to 'stack-question.el')
-rw-r--r--stack-question.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/stack-question.el b/stack-question.el
index 66a4ea3..a7a74df 100644
--- a/stack-question.el
+++ b/stack-question.el
@@ -58,6 +58,12 @@
;; @TODO:
(cl-evenp (random)))
+(defun stack-question--< (property x y &optional pred)
+ "Non-nil if PROPERTY attribute of question X is less than that of Y.
+With optional argument predicate, use it instead of `<'."
+ (funcall (or pred #'<)
+ (cdr (assoc property x))
+ (cdr (assoc property y))))
;;; Displaying a question
(defvar stack-question--window nil