(measure-metrics) combine-metrics ;
: measure-height ( children sizes -- height )
- (measure-metrics) dup [ combine-metrics + ] [ 3drop ] if ;
+ (measure-metrics) [ combine-metrics + ] [ 2drop ] if* ;
GENERIC: paste-clipboard ( gadget clipboard -- )
M: object paste-clipboard
- clipboard-contents dup [ swap user-input ] [ 2drop ] if ;
+ clipboard-contents [ swap user-input ] [ drop ] if* ;
GENERIC: copy-clipboard ( string gadget clipboard -- )
row-rect [ { 0 1 } v* ] change-dim ;
: scroll-to-row ( table n -- )
- dup [ [ thin-row-rect ] [ drop ] 2bi scroll>rect ] [ 2drop ] if ;
+ [ [ thin-row-rect ] [ drop ] 2bi scroll>rect ] [ drop ] if* ;
: (select-row) ( table n -- )
[ scroll-to-row ]
[ { 0 0 } ] dip dim>> gl-fill-rect ;
: draw-standard-background ( object -- )
- dup interior>> dup [ draw-interior ] [ 2drop ] if ;
+ dup interior>> [ draw-interior ] [ drop ] if* ;
: draw-background ( gadget -- )
origin get [
GENERIC: set-history-value ( value object -- )
: (add-history) ( history to -- )
- swap owner>> history-value dup [ swap push ] [ 2drop ] if ;
+ swap owner>> history-value [ swap push ] [ drop ] if* ;
:: go-back/forward ( history to from -- )
from empty? [
] [ append-nums ] if ;
: begin-utf16le ( stream byte -- stream char )
- over stream-read1 dup [ double-le ] [ 2drop replacement-char ] if ;
+ over stream-read1 [ double-le ] [ drop replacement-char ] if* ;
M: utf16le decode-char
drop dup stream-read1 dup [ begin-utf16le ] when nip ;
CHAR: H 0 SBUF" hello world" [ set-nth ] keep first
] unit-test
-{ SBUF" x" } [ 1 <sbuf> CHAR: x >bignum over push ] unit-test
+{ SBUF" x" } [ 1 <sbuf> CHAR: x >bignum suffix! ] unit-test
{ fixnum } [ 1 >bignum SBUF" " new-sequence length class-of ] unit-test
ERROR: not-a-string-number string ;
: ?string>number ( string -- n )
- dup string>number dup [ nip ] [ not-a-string-number ] if ;
+ dup string>number [ ] [ not-a-string-number ] ?if ;
: change-string-number ( string quot -- string' )
[ [ string>number ] dip call number>string ] 2keep drop
"subgraph " write [ id. ] [ statements. ] bi ;
: attribute, ( attr value -- )
- dup [ quote-string "%s=%s," printf ] [ 2drop ] if ;
+ [ quote-string "%s=%s," printf ] [ drop ] if* ;
: attributes. ( attrs -- )
"[" write
: ?register ( acc seq -- )
complete rotate-bits
- dup [ 2 N ^ mod ] map all-unique? [ infimum swap push ] [ 2drop ] if ;
+ [ 2 N ^ mod ] map all-unique? [ infimum swap push ] [ drop ] if* ;
: add-bit ( seen bit -- seen' t/f )
over last 2 * + 2 N ^ mod