]> gitweb.factorcode.org Git - factor.git/commitdiff
[ [ ... ] compare invert-comparison ] sort => [ ... ] inv-sort-with
authorJoe Groff <arcata@gmail.com>
Mon, 3 Aug 2009 01:10:58 +0000 (20:10 -0500)
committerJoe Groff <arcata@gmail.com>
Mon, 3 Aug 2009 01:10:58 +0000 (20:10 -0500)
extra/webapps/blogs/blogs.factor
extra/webapps/planet/planet.factor
extra/webapps/wiki/wiki.factor

index c16450bb251e79083b3e46fbf2d70f7549e934ff..f098bb9f09d4c674aab312709c9612b82415cbe7 100644 (file)
@@ -83,7 +83,7 @@ M: comment entity-url
     >>comments ;
 
 : reverse-chronological-order ( seq -- sorted )
-    [ [ date>> ] compare invert-comparison ] sort ;
+    [ date>> ] inv-sort-with ;
 
 : validate-author ( -- )
     { { "author" [ v-username ] } } validate-params ;
index 8ada4be638b54f50dc9640c6b39391a60716c2e2..eb51acbe1a698e3dcaf8ce9972f5b4a335437209 100755 (executable)
@@ -60,7 +60,7 @@ posting "POSTINGS"
 
 : postings ( -- seq )
     posting new select-tuples
-    [ [ date>> ] compare invert-comparison ] sort ;
+    [ date>> ] inv-sort-with ;
 
 : <edit-blogroll-action> ( -- action )
     <page-action>
@@ -99,7 +99,7 @@ posting "POSTINGS"
     [ '[ _ <posting> ] map ] 2map concat ;
 
 : sort-entries ( entries -- entries' )
-    [ [ date>> ] compare invert-comparison ] sort ;
+    [ date>> ] inv-sort-with ;
 
 : update-cached-postings ( -- )
     blogroll fetch-blogroll sort-entries 8 short head [
index 118f92061b509cd9a567d5d177568c839cc219de..f3a3784465d254d80882184e872913fed901e8a3 100644 (file)
@@ -66,7 +66,7 @@ M: revision feed-entry-date date>> ;
 M: revision feed-entry-url id>> revision-url ;
 
 : reverse-chronological-order ( seq -- sorted )
-    [ [ date>> ] compare invert-comparison ] sort ;
+    [ date>> ] inv-sort-with ;
 
 : <revision> ( id -- revision )
     revision new swap >>id ;