From 8e9983d1c9edab01335e3923bb5b50ad5a91ed1f Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Thu, 15 Jan 2015 00:09:31 -0500 Subject: Abstract sorting function --- sx-question.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sx-question.el') diff --git a/sx-question.el b/sx-question.el index b9fc78a..d624f45 100644 --- a/sx-question.el +++ b/sx-question.el @@ -187,6 +187,13 @@ If no cache exists for it, initialize one with SITE." "Formats TAG for display." (concat "[" tag "]")) + +;;; Question Mode Answer-Sorting Functions + +(sx--create-comparator sx-answer-higher-score-p + "Return t if answer A has a higher score than answer B." + #'> (lambda (x) (cdr (assoc 'score x)))) + (provide 'sx-question) ;;; sx-question.el ends here -- cgit v1.2.3