extra: use [-] instead of "- 0 max".

db4
John Benediktsson 2013-03-05 18:17:17 -08:00
parent 53992695e4
commit cf4d639345
5 changed files with 6 additions and 6 deletions

View File

@ -58,7 +58,7 @@ total-births total-deaths ;
} cleave 100 /i 1 + ;
: #starved ( game -- n )
[ population>> ] [ feed>> 20 /i ] bi - 0 max ;
[ population>> ] [ feed>> 20 /i ] bi [-] ;
: leave-fink ( -- )
"DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY" print

View File

@ -106,10 +106,10 @@ foreground background page-color inset line-height metrics ;
[ 0 >>x ] dip [ dup line-break ] times drop ;
: avail-width ( canvas -- n )
[ width ] [ x>> ] bi - 0 max ;
[ width ] [ x>> ] bi [-] ;
: avail-height ( canvas -- n )
[ height ] [ y>> ] bi - 0 max ;
[ height ] [ y>> ] bi [-] ;
: avail-lines ( canvas -- n )
[ avail-height ] [ line-height>> ] bi /i ; ! FIXME: 1 +

View File

@ -256,7 +256,7 @@ M: table-row pdf-render
] each widths >alist sort-keys values
! make last cell larger
dup sum 400 swap - 0 max [ + ] curry dupd change-last
dup sum 400 swap [-] [ + ] curry dupd change-last
! size down each column
dup sum dup 400 > [ 400 swap / [ * ] curry map ] [ drop ] if ;

View File

@ -177,7 +177,7 @@ IN: sequences.extras
<PRIVATE
: ((each-from)) ( i seq -- n quot )
[ length over - 0 max swap ] keep '[ _ + _ nth-unsafe ] ; inline
[ length over [-] swap ] keep '[ _ + _ nth-unsafe ] ; inline
: (each-from) ( i seq quot -- n quot' ) [ ((each-from)) ] dip compose ;
inline

View File

@ -18,7 +18,7 @@ CONSTANT: unit-suffix-hash H{
:: find-unit-suffix ( suffixes n multiplier base -- i/f )
suffixes length
[ [ n ] dip multiplier base threshhold < ] find-integer
suffixes length or 1 - 0 max ;
suffixes length or 1 [-] ;
:: reduce-magnitude ( n multiplier base suffixes -- string )
n 0 < [