hash-sets: Support >alist on hash-sets or else tab-completion breaks. Can we write a unit test for this too?
parent
85a3966a9d
commit
dc395a6b31
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2010 Daniel Ehrenberg
|
! Copyright (C) 2010 Daniel Ehrenberg
|
||||||
! Copyright (C) 2005, 2011 John Benediktsson, Slava Pestov.
|
! Copyright (C) 2005, 2011 John Benediktsson, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays hash-sets hashtables.private kernel
|
USING: accessors arrays assocs hash-sets hashtables.private
|
||||||
kernel.private math math.private sequences sequences.private
|
kernel kernel.private math math.private sequences
|
||||||
sets sets.private slots.private vectors ;
|
sequences.private sets sets.private slots.private vectors ;
|
||||||
IN: hash-sets
|
IN: hash-sets
|
||||||
|
|
||||||
TUPLE: hash-set
|
TUPLE: hash-set
|
||||||
|
@ -163,3 +163,6 @@ PRIVATE>
|
||||||
|
|
||||||
M: sequence all-unique?
|
M: sequence all-unique?
|
||||||
dup length <hash-set> [ (all-unique?) ] curry all? ;
|
dup length <hash-set> [ (all-unique?) ] curry all? ;
|
||||||
|
|
||||||
|
M: hash-set >alist
|
||||||
|
array>> dup zip ;
|
||||||
|
|
Loading…
Reference in New Issue