]> gitweb.factorcode.org Git - factor.git/commitdiff
some cleanup.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 27 Nov 2016 06:01:03 +0000 (22:01 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 27 Nov 2016 06:01:03 +0000 (22:01 -0800)
basis/match/match.factor
basis/peg/search/search.factor
basis/tools/files/unix/unix.factor
basis/ui/backend/windows/windows.factor
extra/freetype/freetype.factor

index 489fa83a38845e97b72d76bbeef53e0d5626b7f6..aa68543d14c1cfc7b3e99460b7852f57ba23844e 100644 (file)
@@ -39,7 +39,7 @@ PREDICATE: match-var < word "match-var" word-prop ;
             2dup [ class-of ] same? [
                 [ tuple-slots ] bi@ [ (match) ] 2all?
             ] [ 2drop f ] if ] }
-        { [ t ] [ 2drop f ] }
+        [ 2drop f ]
     } cond ;
 
 : match ( value1 value2 -- bindings )
@@ -84,7 +84,7 @@ M: tuple replace-patterns tuple>array replace-patterns >tuple ;
     (match-first) drop ;
 
 : (match-all) ( seq pattern-seq -- )
-    [ nip ] [ (match-first) swap ] 2bi
+    [ (match-first) ] keep
     [ , [ swap (match-all) ] [ drop ] if* ] [ 2drop ] if* ;
 
 : match-all ( seq pattern-seq -- bindings-seq )
index 4ad4a9c906d8800e408cab119201cfa59b5efa78..668b72cc71ddd5f66056aaa1efb0d95176f7c90b 100644 (file)
@@ -9,7 +9,7 @@ IN: peg.search
         { [ over number? ] [ stream-write1 ] }
         { [ over string? ] [ stream-write ] }
         { [ over sequence? ] [ [ stream-tree-write ] curry each ] }
-        { [ t ] [ stream-write ] }
+        [ stream-write ]
     } cond ;
 
 : tree-write ( object -- )
index 2ff3ae8f8daba6e5dbd5cb9e69bde42c0ff24778..642ee164cca36ca037156d2bb2c8bbf45cd014a5 100644 (file)
@@ -42,7 +42,7 @@ IN: tools.files.unix
         { [ dup S_IFLNK = ] [ drop "@" ] }
         { [ dup S_IFWHT = ] [ drop "%" ] }
         { [ dup S_IFSOCK = ] [ drop "=" ] }
-        { [ t ] [ drop "" ] }
+        [ drop "" ]
     } cond ;
 
 M: unix (directory.) ( path -- lines )
index 9bf7af30ed326ad5bf03c77b2021f7e59f67cdf4..23b237ab7e88e103b0b38aeb022d91a47db803f1 100755 (executable)
@@ -415,7 +415,7 @@ CONSTANT: exclude-keys-wm-char
         { [ over SC_RESTORE = ] [ t set-window-active ] }
         { [ over SC_MAXIMIZE = ] [ t set-window-active ] }
         { [ dup alpha? ] [ 4drop 0 ] }
-        { [ t ] [ DefWindowProc ] }
+        [ DefWindowProc ]
     } cond ;
 
 : cleanup-window ( handle -- )
index dc93e26ea9380036d48fc55602286aadb76025fd..c6d1509986c1b85d48f8c81baa1aabbc5fe95528 100644 (file)
@@ -7,7 +7,7 @@ IN: freetype
 << "freetype" {
     { [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" cdecl add-library ] }
     { [ os windows? ] [ "freetype6.dll" cdecl add-library ] }
-    { [ t ] [ drop ] }
+    [ drop ]
 } cond >>
 
 LIBRARY: freetype