NoneTrue
Examples
open all close allBasic Examples (4)
Check if no element of a list satisfies a condition:
NoneTrue[{1, 2, 3, 4, 5, 6}, EvenQ]NoneTrue[{1, 3, 5, 7, 9}, EvenQ]Check if no element of a matrix satisfies a condition:
NoneTrue[{{1, 2, 3}, {4, 5, 6}}, EvenQ, 2]NoneTrue[{{1, 3, 5}, {7, 9, 11}}, EvenQ, 2]Check if no value of an association satisfies a condition:
NoneTrue[<|"a" -> 2, "b" -> 3, "c" -> 6|>, OddQ]A symbolic result may be returned:
a = NoneTrue[{12, 16, x, 14, y}, # < 10&]% /. {x -> 13, y -> 17}Even when the condition applied to some elements is symbolic, a definitive result may be deduced:
NoneTrue[{12, 16, x, 8, 14, y}, # < 10&]TrueQ may be used to avoid getting a symbolic result:
NoneTrue[{12, 16, x, 14, y}, TrueQ[# < 10]&]Scope (3)
NoneTrue may be applied to expressions with any head:
NoneTrue[f[2, 8, 6], OddQ]NoneTrue[f[x, y, z], # < 10&]NoneTrue can operate on ragged expressions:
NoneTrue[{{1, 2, 3}, {4, 5}}, EvenQ, 2]NoneTrue[f[{1, 3, 5}, {7, 9}], EvenQ, 2]By default, NoneTrue always operates at level 1:
NoneTrue[4, EvenQ]NoneTrue[{}, EvenQ]NoneTrue[4, EvenQ, 0]Properties & Relations (5)
Compose the predicate with TrueQ to make the predicate stronger:
NoneTrue[{x, y, z}, Composition[TrueQ, f]]NoneTrue[list,f] is equivalent to AllTrue[list,Composition[Not,f]]:
LogicalExpand /@ {NoneTrue[{x, y, z}, f], AllTrue[{x, y, z}, !f[#]&]}NoneTrue[list,f] is equivalent to VectorQ[list,Composition[Not,f]] when f evaluates to True or False:
{NoneTrue[Range[10], Negative], VectorQ[Range[10], Composition[Not, Negative]]}NoneTrue[list,f] works efficiently on sparse vectors:
NoneTrue[SparseArray[{1000 -> 2}, {1000000000000}], OddQ]NoneTrue[list,test] checks the parts of list in order, stopping as soon as test returns True:
NoneTrue[{1, 2, 3, 4, 5}, (Print[#];EvenQ[#])&]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_2026_nonetrue, author="Wolfram Research", title="{NoneTrue}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/NoneTrue.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_nonetrue, organization={Wolfram Research}, title={NoneTrue}, year={2015}, url={https://reference.wolfram.com/language/ref/NoneTrue.html}, note=[Accessed: 13-June-2026]}