NoneTrue

NoneTrue[{e1,e2,},test]

yields True if test[ei] is False for all of the ei.

NoneTrue[expr,test,level]

tests parts of expr at level level.

NoneTrue[test]

represents an operator form of NoneTrue that can be applied to an expression.

Details

  • NoneTrue[list,test] and NoneTrue[expr,test,level] only evaluate as many test[ei] as are necessary to determine the result.
  • NoneTrue[list,test] is equivalent to NoneTrue[list,test,1].
  • NoneTrue[test][list] is equivalent to NoneTrue[list,test].

Examples

open allclose all

Basic Examples  (4)

Check if no element of a list satisfies a condition:

Check if no element of a matrix satisfies a condition:

Check if no value of an association satisfies a condition:

A symbolic result may be returned:

Even when the condition applied to some elements is symbolic, a definitive result may be deduced:

TrueQ may be used to avoid getting a symbolic result:

Scope  (3)

NoneTrue may be applied to expressions with any head:

NoneTrue can operate on ragged expressions:

By default, NoneTrue always operates at level 1:

Properties & Relations  (5)

Compose the predicate with TrueQ to make the predicate stronger:

NoneTrue[list,f] is equivalent to AllTrue[list,Composition[Not,f]]:

NoneTrue[list,f] is equivalent to VectorQ[list,Composition[Not,f]] when f evaluates to True or False:

NoneTrue[list,f] works efficiently on sparse vectors:

NoneTrue[list,test] checks the parts of list in order, stopping as soon as test returns True:

Possible Issues  (1)

A symbolic result may be returned:

Wolfram Research (2014), NoneTrue, Wolfram Language function, https://reference.wolfram.com/language/ref/NoneTrue.html (updated 2015).

Text

Wolfram Research (2014), NoneTrue, Wolfram Language function, https://reference.wolfram.com/language/ref/NoneTrue.html (updated 2015).

CMS

Wolfram Language. 2014. "NoneTrue." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/NoneTrue.html.

APA

Wolfram Language. (2014). NoneTrue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NoneTrue.html

BibTeX

@misc{reference.wolfram_2024_nonetrue, author="Wolfram Research", title="{NoneTrue}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/NoneTrue.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_nonetrue, organization={Wolfram Research}, title={NoneTrue}, year={2015}, url={https://reference.wolfram.com/language/ref/NoneTrue.html}, note=[Accessed: 22-December-2024 ]}