Nothing
represents an element of a list that will automatically be removed.
Nothing[…]
gives Nothing.
Details
- Nothing is removed as part of the standard evaluation process. It is not removed in expressions that are held or inactive.
Examples
open allclose allBasic Examples (2)
Any occurrence of Nothing is automatically removed in a list:
Replace an element of a list with Nothing to remove it:
Scope (2)
Nothing is removed wherever it appears in a list:
Nothing is not removed from heads other than List:
Generalizations & Extensions (1)
When Nothing appears as a head, it reduces any expression to Nothing:
Applications (1)
Delete lines from a plot, leaving only isolated points:
Properties & Relations (3)
Nothing is removed during the standard evaluation process:
Remove primes from a list by replacing them with Nothing:
Delete the primes with a pattern:
Nothing will only disappear inside lists:
An empty Sequence[] will evaporate inside any head except those with special attributes:
Possible Issues (1)
Nothing is removed as part of standard evaluation, so it is kept in held expressions:
Text
Wolfram Research (2015), Nothing, Wolfram Language function, https://reference.wolfram.com/language/ref/Nothing.html (updated 2016).
CMS
Wolfram Language. 2015. "Nothing." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Nothing.html.
APA
Wolfram Language. (2015). Nothing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Nothing.html