some cleanup.

char-rename
John Benediktsson 2016-11-26 22:01:03 -08:00
parent 72cf4fec47
commit dadff2f062
5 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ PREDICATE: match-var < word "match-var" word-prop ;
2dup [ class-of ] same? [ 2dup [ class-of ] same? [
[ tuple-slots ] bi@ [ (match) ] 2all? [ tuple-slots ] bi@ [ (match) ] 2all?
] [ 2drop f ] if ] } ] [ 2drop f ] if ] }
{ [ t ] [ 2drop f ] } [ 2drop f ]
} cond ; } cond ;
: match ( value1 value2 -- bindings ) : match ( value1 value2 -- bindings )
@ -84,7 +84,7 @@ M: tuple replace-patterns tuple>array replace-patterns >tuple ;
(match-first) drop ; (match-first) drop ;
: (match-all) ( seq pattern-seq -- ) : (match-all) ( seq pattern-seq -- )
[ nip ] [ (match-first) swap ] 2bi [ (match-first) ] keep
[ , [ swap (match-all) ] [ drop ] if* ] [ 2drop ] if* ; [ , [ swap (match-all) ] [ drop ] if* ] [ 2drop ] if* ;
: match-all ( seq pattern-seq -- bindings-seq ) : match-all ( seq pattern-seq -- bindings-seq )

View File

@ -9,7 +9,7 @@ IN: peg.search
{ [ over number? ] [ stream-write1 ] } { [ over number? ] [ stream-write1 ] }
{ [ over string? ] [ stream-write ] } { [ over string? ] [ stream-write ] }
{ [ over sequence? ] [ [ stream-tree-write ] curry each ] } { [ over sequence? ] [ [ stream-tree-write ] curry each ] }
{ [ t ] [ stream-write ] } [ stream-write ]
} cond ; } cond ;
: tree-write ( object -- ) : tree-write ( object -- )

View File

@ -42,7 +42,7 @@ IN: tools.files.unix
{ [ dup S_IFLNK = ] [ drop "@" ] } { [ dup S_IFLNK = ] [ drop "@" ] }
{ [ dup S_IFWHT = ] [ drop "%" ] } { [ dup S_IFWHT = ] [ drop "%" ] }
{ [ dup S_IFSOCK = ] [ drop "=" ] } { [ dup S_IFSOCK = ] [ drop "=" ] }
{ [ t ] [ drop "" ] } [ drop "" ]
} cond ; } cond ;
M: unix (directory.) ( path -- lines ) M: unix (directory.) ( path -- lines )

View File

@ -415,7 +415,7 @@ CONSTANT: exclude-keys-wm-char
{ [ over SC_RESTORE = ] [ t set-window-active ] } { [ over SC_RESTORE = ] [ t set-window-active ] }
{ [ over SC_MAXIMIZE = ] [ t set-window-active ] } { [ over SC_MAXIMIZE = ] [ t set-window-active ] }
{ [ dup alpha? ] [ 4drop 0 ] } { [ dup alpha? ] [ 4drop 0 ] }
{ [ t ] [ DefWindowProc ] } [ DefWindowProc ]
} cond ; } cond ;
: cleanup-window ( handle -- ) : cleanup-window ( handle -- )

View File

@ -7,7 +7,7 @@ IN: freetype
<< "freetype" { << "freetype" {
{ [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" cdecl add-library ] } { [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" cdecl add-library ] }
{ [ os windows? ] [ "freetype6.dll" cdecl add-library ] } { [ os windows? ] [ "freetype6.dll" cdecl add-library ] }
{ [ t ] [ drop ] } [ drop ]
} cond >> } cond >>
LIBRARY: freetype LIBRARY: freetype