diff options
author | Sean Allred <code@seanallred.com> | 2015-01-15 00:09:31 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-15 00:21:28 -0500 |
commit | 8e9983d1c9edab01335e3923bb5b50ad5a91ed1f (patch) | |
tree | 225eff54c34d5ab40adfe9296d5272871d5988d3 /sx-question.el | |
parent | 3328a62d42ff3ca62c31366a4cd0cfd38a3ec663 (diff) |
Abstract sorting function
Diffstat (limited to 'sx-question.el')
-rw-r--r-- | sx-question.el | 7 |
1 files changed, 7 insertions, 0 deletions
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 |