"." split [ string>number ] map ;
: version-before? ( version1 version2 -- ? )
- swap version-seq swap version-seq before=? ;
+ [ version-seq ] bi@ before=? ;
: (gl-version) ( -- version vendor )
GL_VERSION glGetString " " split1 ;
new swap add-gadget ; inline
: <border> ( child gap -- border )
- swap border new-border
- swap >>size ;
+ [ border new-border ] dip >>size ;
: <filled-border> ( child gap -- border )
<border> { 1 1 } >>fill ;
[ [ object>> ] keep show-summary ] [ button-update ] bi ;
: <presentation> ( label object -- button )
- swap [ invoke-primary ] presentation new-button
- swap >>object
+ [ [ invoke-primary ] presentation new-button ] dip
+ >>object
[ drop ] >>hook
roll-button-theme ;
: append-nums ( stream byte -- stream char )
over stream-read1 dup starts-2?
- [ swap 6 shift swap BIN: 111111 bitand bitor ]
+ [ [ 6 shift ] dip BIN: 111111 bitand bitor ]
[ 2drop replacement-char ] if ; inline
: minimum-code-point ( char minimum -- char )
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien arrays assocs classes
-classes.tuple.private combinators.short-circuit fry hashtables
-io kernel kernel.private locals.backend make math namespaces
-prettyprint quotations sequences sequences.deep shuffle
-slots.private vectors vocabs words words.alias ;
+classes.tuple.private combinators.short-circuit continuations
+fry hashtables io kernel kernel.private locals.backend make
+math namespaces prettyprint quotations sequences sequences.deep
+shuffle slots.private splitting stack-checker vectors vocabs
+words words.alias ;
IN: lint
PRIVATE>
+: find-swap/swap ( word -- ? )
+ def>> [ callable? ] deep-filter
+ [
+ {
+ [ [ \ swap = ] count 2 >= ]
+ [
+ { swap } split rest but-last
+ [ [ infer ] [ 2drop ( -- ) ] recover ( x -- x ) = ] any?
+ ]
+ } 1&&
+ ] any? ;
+
: lint-all ( -- seq )
all-words run-lint dup lint. ;