Update code that did ">alist sort-" to just "sort-".

db4
John Benediktsson 2011-04-07 09:01:21 -07:00
parent 9efa64831f
commit d58bc08aa0
14 changed files with 14 additions and 14 deletions

View File

@ -36,7 +36,7 @@ IN: heaps.tests
] H{ } map>assoc ;
: test-heap-sort ( n -- ? )
random-alist dup >alist sort-keys swap heap-sort = ;
random-alist dup sort-keys swap heap-sort = ;
14 [
[ t ] swap [ 2^ test-heap-sort ] curry unit-test

View File

@ -452,7 +452,7 @@ M: array elements*
: $definition-icons ( element -- )
drop
icons get >alist sort-keys
icons get sort-keys
[ [ <$link> ] [ definition-icon-path <$image> ] bi* swap ] assoc-map
{ "" "Definition class" } prefix
$table ;

View File

@ -37,7 +37,7 @@ CONSTANT: max-redirects 10
[ "Header injection attack" throw ] when ;
: write-header ( assoc -- )
>alist sort-keys [
sort-keys [
[ check-header-string write ": " write ]
[ header-value>string check-header-string write crlf ] bi*
] assoc-each crlf ;

View File

@ -21,7 +21,7 @@ SYMBOL: message-histogram
drop ;
: recent-histogram ( assoc n -- alist )
[ >alist sort-values <reversed> ] dip short head ;
[ sort-values <reversed> ] dip short head ;
: analyze-entries ( entries word-names -- errors word-histogram message-histogram )
[

View File

@ -59,7 +59,7 @@ PRIVATE>
swapd each-permutation ; inline
: inverse-permutation ( seq -- permutation )
<enum> >alist sort-values keys ;
<enum> sort-values keys ;
! Combinadic-based combination methodology

View File

@ -80,7 +80,7 @@ PRIVATE>
[ inc-at ] sequence>hashtable ;
: sorted-histogram ( seq -- alist )
histogram >alist sort-values ;
histogram sort-values ;
: collect-values ( seq quot: ( obj hashtable -- ) -- hash )
'[ [ dup @ ] dip push-at ] sequence>hashtable ; inline

View File

@ -47,7 +47,7 @@ IN: regexp.minimize
over '[ drop first2 _ _ stay-same? ] assoc-filter ;
: partition>classes ( partitions -- synonyms ) ! old-state => new-state
>alist sort-keys
sort-keys
[ drop first2 swap ] assoc-map
<reversed>
>hashtable ;

View File

@ -28,7 +28,7 @@ IN: tools.threads
[ [ write ] with-cell ] each
] with-row
threads >alist sort-keys values [
threads sort-keys values [
[ thread. ] with-row
] each
] tabular-output nl ;

View File

@ -59,7 +59,7 @@ M: source-file-renderer column-alignment drop { 0 0 1 } ;
M: source-file-renderer filled-column drop 1 ;
: <source-file-model> ( model -- model' )
[ group-by-source-file >alist sort-keys ] <arrow> ;
[ group-by-source-file sort-keys ] <arrow> ;
:: <source-file-table> ( error-list -- table )
error-list model>> <source-file-model>

View File

@ -141,7 +141,7 @@ PRIVATE>
2dup bounds-check? [ set-nth ] [ 3drop ] if ;
:: fill-ranges ( table -- table )
name-map >alist sort-values keys
name-map sort-values keys
[ { [ "first>" tail? ] [ "last>" tail? ] } 1|| ] filter
2 group [
[ name>char ] bi@ [ [a,b] ] [ table ?nth ] bi

View File

@ -67,7 +67,7 @@ M: interpolated [undo-xml]
: >enum ( assoc -- enum )
! Assumes keys are 0..n
>alist sort-keys values <enum> ;
sort-keys values <enum> ;
: undo-xml ( xml -- quot )
[undo-xml] '[ H{ } clone [ _ bind ] keep >enum ] ;

View File

@ -24,7 +24,7 @@ ARTICLE: "enums" "Enumerations"
<enum>
}
"Inverting a permutation using enumerations:"
{ $example "IN: scratchpad" ": invert ( perm -- perm' )" " <enum> >alist sort-values keys ;" "{ 2 0 4 1 3 } invert ." "{ 1 3 0 4 2 }" } ;
{ $example "IN: scratchpad" ": invert ( perm -- perm' )" " <enum> sort-values keys ;" "{ 2 0 4 1 3 } invert ." "{ 1 3 0 4 2 }" } ;
HELP: enum
{ $class-description "An associative structure which wraps a sequence and maps integers to the corresponding elements of the sequence."

View File

@ -19,7 +19,7 @@ CONSTANT: knucleotide-in "vocab:benchmark/knucleotide/knucleotide-input.txt"
: handle-table ( inputs n -- )
<clumps>
[ histogram >alist sort-values reverse ] [ length ] bi
[ histogram sort-values reverse ] [ length ] bi
'[
[ first write bl ]
[ second 100 * _ /f "%.3f" printf nl ] bi

View File

@ -53,7 +53,7 @@ nonce ;
] H{ } make-assoc ; inline
:: sign-params ( url request-method consumer-token request-token params -- signed-params )
params >alist sort-keys :> params
params sort-keys :> params
url request-method params signature-base-string :> sbs
consumer-token secret>> request-token dup [ secret>> ] when hmac-key :> key
sbs key sha1 hmac-bytes >base64 >string :> signature