IsUnity

com.phasmidsoftware.number.expression.expr.IsUnity
object IsUnity

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
IsUnity.type

Members list

Value members

Concrete methods

def unapply(expr: Expression): Option[Expression]

Extracts an Expression if it represents unity.

Extracts an Expression if it represents unity.

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