Object IsUnity is used to identify and extract instances of Expression that represent unity. Unity is determined based on the isUnity property of the Expression.
This method serves as an extractor that can be used in pattern matching to determine if the provided Expression is unity, as defined by its isUnity property. If the Expression is unity, it is returned wrapped in an Option. Otherwise, None is returned.
Value parameters
expr
the Expression to be checked and potentially extracted
Attributes
Returns
an Option of the Expression if it represents unity, or None otherwise