assocs: 50% faster zip.

John Benediktsson 2012-04-25 20:09:21 -07:00
parent f51a8f49ef
commit 9f4d5da304
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ M: assoc value-at* swap [ = nip ] curry assoc-find nip ;
[ ?push ] change-at ;
: zip ( keys values -- alist )
2array flip ; inline
[ 2array ] { } 2map-as ; inline
: unzip ( assoc -- keys values )
dup assoc-empty? [ drop { } { } ] [ >alist flip first2 ] if ;