]> gitweb.factorcode.org Git - factor.git/commitdiff
hash-sets: Support >alist on hash-sets or else tab-completion breaks. Can we write...
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 9 Mar 2013 01:32:46 +0000 (17:32 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 9 Mar 2013 01:32:46 +0000 (17:32 -0800)
core/hash-sets/hash-sets.factor

index 1d2f0ec7d642f545682a5bc8cd93e9fa5e8408de..56f0effd0ee8e708358b70ccb23d6f33b434de45 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2010 Daniel Ehrenberg
 ! Copyright (C) 2005, 2011 John Benediktsson, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays hash-sets hashtables.private kernel
-kernel.private math math.private sequences sequences.private
-sets sets.private slots.private vectors ;
+USING: accessors arrays assocs hash-sets hashtables.private
+kernel kernel.private math math.private sequences
+sequences.private sets sets.private slots.private vectors ;
 IN: hash-sets
 
 TUPLE: hash-set
@@ -163,3 +163,6 @@ PRIVATE>
 
 M: sequence all-unique?
     dup length <hash-set> [ (all-unique?) ] curry all? ;
+
+M: hash-set >alist
+    array>> dup zip ;