Use unique word

db4
Slava Pestov 2008-05-11 13:07:07 -05:00
parent 4532810923
commit e13be8ce3f
3 changed files with 4 additions and 7 deletions

View File

@ -3,7 +3,7 @@
USING: arrays definitions graphs assocs kernel kernel.private
slots.private math namespaces sequences strings vectors sbufs
quotations assocs hashtables sorting words.private vocabs
math.order ;
math.order sets ;
IN: words
: word ( -- word ) \ word get-global ;
@ -121,7 +121,7 @@ SYMBOL: +called+
compiled-crossref get at ;
: compiled-usages ( words -- seq )
[ [ dup ] H{ } map>assoc dup ] keep [
[ unique dup ] keep [
compiled-usage [ nip +inlined+ eq? ] assoc-filter update
] with each keys ;

View File

@ -2,9 +2,6 @@ USING: arrays assocs kernel vectors sequences namespaces
random math.parser ;
IN: assocs.lib
: >set ( seq -- hash )
[ dup ] H{ } map>assoc ;
: ref-at ( table key -- value ) swap at ;
: put-at* ( table key value -- ) swap rot set-at ;

View File

@ -1,7 +1,7 @@
USING: unicode.categories kernel math combinators splitting
sequences math.parser io.files io assocs arrays namespaces
math.ranges unicode.normalize values io.encodings.ascii
unicode.syntax unicode.data compiler.units alien.syntax ;
unicode.syntax unicode.data compiler.units alien.syntax sets ;
IN: unicode.breaks
C-ENUM: Any L V T Extend Control CR LF graphemes ;
@ -27,7 +27,7 @@ CATEGORY: grapheme-control Zl Zp Cc Cf ;
[ "#" split1 drop ";" split1 drop trim-blank ] map
[ empty? not ] filter
[ ".." split1 [ dup ] unless* [ hex> ] bi@ [a,b] ] map
concat [ dup ] H{ } map>assoc ;
concat unique ;
: other-extend-lines ( -- lines )
"resource:extra/unicode/PropList.txt" ascii file-lines ;