core/basis/extra: use none?.

windows-high-dpi
John Benediktsson 2018-02-14 11:56:31 -08:00
parent 01f7f6b76c
commit bd9676e152
14 changed files with 15 additions and 15 deletions

View File

@ -256,7 +256,7 @@ M: sqlite-db-connection persistent-table ( -- assoc )
" interpolate>string ;
: can-be-null? ( -- ? )
"sql-spec" get modifiers>> [ +not-null+ = ] any? not ;
"sql-spec" get modifiers>> [ +not-null+ = ] none? ;
: delete-cascade? ( -- ? )
"sql-spec" get modifiers>> { +on-delete+ +cascade+ } swap subseq? ;

View File

@ -11,7 +11,7 @@ IN: math.primes.erato.fast
CONSTANT: wheel-2-3-5-7 $[
11 dup 210 + [a,b] [
{ 2 3 5 7 } [ divisor? ] with any? not
{ 2 3 5 7 } [ divisor? ] with none?
] B{ } filter-as differences
]

View File

@ -18,9 +18,9 @@ IN: math.primes.miller-rabin
] [
r <iota> [
2^ s * a swap n ^mod n-1 =
] any? not
] none?
] if
] any? not ;
] none? ;
PRIVATE>

View File

@ -425,7 +425,7 @@ M: ebnf-sequence build-locals ( code ast -- code )
elements>> filter-hidden dup length 1 = [
first build-locals
] [
dup [ ebnf-var? ] any? not [
dup [ ebnf-var? ] none? [
drop
] [
[

View File

@ -31,7 +31,7 @@ M: prolog process
: before-main? ( -- ? )
xml-stack get {
[ length 1 = ]
[ first second [ tag? ] any? not ]
[ first second [ tag? ] none? ]
} 1&& ;
M: directive process

View File

@ -273,7 +273,7 @@ PRIVATE>
ERROR: topological-sort-failed ;
: largest-class ( seq -- n elt )
dup [ [ class< ] with any? not ] curry find-last
dup [ [ class< ] with none? ] curry find-last
[ topological-sort-failed ] unless* ;
: sort-classes ( seq -- newseq )

View File

@ -184,7 +184,7 @@ PRIVATE>
{ [ dup empty? ] [ 2drop ] }
{ [ dup [ length 4 <= ] [ [ word? ] any? ] bi or ] [ drop linear-case-quot ] }
{ [ dup contiguous-range? ] [ drop dispatch-case-quot ] }
{ [ dup [ wrapper? ] any? not ] [ drop hash-case-quot ] }
{ [ dup [ wrapper? ] none? ] [ drop hash-case-quot ] }
{ [ dup [ wrapper? ] all? ] [ drop [ [ wrapped>> ] dip ] assoc-map hash-case-quot ] }
[ drop linear-case-quot ]
} cond ;

View File

@ -39,7 +39,7 @@ PRIVATE>
: forward-reference? ( word -- ? )
dup old-definitions get [ in? ] with any? [
new-definitions get [ in? ] with any? not
new-definitions get [ in? ] with none?
] [ drop f ] if ;
SYMBOL: compiler-impl

View File

@ -5,7 +5,7 @@ grouping kernel math math.functions math.order math.vectors
parser prettyprint.custom sequences sequences.deep ;
IN: arrays.shaped
: flat? ( array -- ? ) [ sequence? ] any? not ; inline
: flat? ( array -- ? ) [ sequence? ] none? ; inline
GENERIC: array-replace ( object -- shape )

View File

@ -45,7 +45,7 @@ TUPLE: code-file
: include-file-name? ( name -- ? )
{
[ path-components [ "." head? ] any? not ]
[ path-components [ "." head? ] none? ]
[ link-info regular-file? ]
} 1&& ;

View File

@ -16,7 +16,7 @@ IN: math.primes.solovay-strassen
a n jacobi n mod'
a n 1 - 2 /i n ^mod = not
] if
] any? not ;
] none? ;
PRIVATE>

View File

@ -73,7 +73,7 @@ TUPLE: cell #adjacent mined? state ;
{ [ lost? ] [ won? ] } 1|| ;
: new-game? ( cells -- ? )
[ [ state>> +clicked+ = ] any? ] any? not ;
[ [ state>> +clicked+ = ] any? ] none? ;
DEFER: click-cell-at

View File

@ -76,7 +76,7 @@ SYMBOL: total
! Part II: Topologically sorting specializers
: maximal-element ( seq quot -- n elt )
dupd [
swapd [ call +lt+ = ] 2curry any? not
swapd [ call +lt+ = ] 2curry none?
] 2curry find [ "Topological sort failed" throw ] unless* ;
inline

View File

@ -28,7 +28,7 @@ IN: project-euler.035
: possible? ( seq -- ? )
dup length 1 > [
[ even? ] any? not
[ even? ] none?
] [
drop t
] if ;