]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unicode/collation/collation.factor
factor: trim some using lists
[factor.git] / basis / unicode / collation / collation.factor
index 9e860cf03f5c505f15e4885ad58bfebc576afe1e..108eb69389aca7ae19f98d13125606c9aa1eab9c 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs combinators
-combinators.short-circuit combinators.smart fry kernel locals make
+combinators.short-circuit combinators.smart fry kernel make
 math math.order math.parser namespaces sequences
 simple-flat-file splitting strings unicode.data ;
 IN: unicode.collation
@@ -221,14 +221,14 @@ fixup-ducet-for-tibetan
 : base ( char -- base )
     {
         { [ dup 0x03400 0x04DBF between? ] [ drop 0xFB80 ] } ! Extension A
-        { [ dup 0x20000 0x2A6DD between? ] [ drop 0xFB80 ] } ! Extension B
-        { [ dup 0x2A700 0x2B734 between? ] [ drop 0xFB80 ] } ! Extension C
+        { [ dup 0x20000 0x2A6DF between? ] [ drop 0xFB80 ] } ! Extension B
+        { [ dup 0x2A700 0x2B738 between? ] [ drop 0xFB80 ] } ! Extension C
         { [ dup 0x2B740 0x2B81D between? ] [ drop 0xFB80 ] } ! Extension D
         { [ dup 0x2B820 0x2CEA1 between? ] [ drop 0xFB80 ] } ! Extension E
         { [ dup 0x2CEB0 0x2EBE0 between? ] [ drop 0xFB80 ] } ! Extension F
         { [ dup 0x30000 0x3134A between? ] [ drop 0xFB80 ] } ! Extension G
         { [ dup 0x03400 0x04DBF between? ] [ drop 0xFB40 ] } ! CJK
-        { [ dup 0x04E00 0x09FFC between? ] [ drop 0xFB40 ] } ! CJK
+        { [ dup 0x04E00 0x09FFF between? ] [ drop 0xFB40 ] } ! CJK
         [ drop 0xFBC0 ] ! Other
     } cond ;
 
@@ -316,7 +316,7 @@ fixup-ducet-for-tibetan
             [ [ primary>> ] append-weights { 0 } ]
             [ [ secondary>> ] append-weights { 0 } ]
             [ [ tertiary>> ] append-weights { 0 } ]
-            [ [ [ secondary>> ] [ tertiary>> ] bi [ zero? ] bi@ and not ] filter [ variable-weight ] map ]
+            [ [ [ secondary>> ] [ tertiary>> ] bi [ zero? ] both? ] reject [ variable-weight ] map ]
         } cleave
     ] { } append-outputs-as ;