Operations
Object providing operations to evaluate dyadic and monadic functions on values, as well as query transformations.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Operations.type
Members list
Value members
Concrete methods
Composes two Value instances dyadically, using the provided set of dyadic functions to determine the appropriate composition behavior based on their types.
Composes two Value instances dyadically, using the provided set of dyadic functions to determine the appropriate composition behavior based on their types.
Value parameters
- functions
-
a tuple of dyadic functions (
DyadicFunctions) which include functions for integer, rational, and double types, respectively. - other
-
the second
Valueinstance to compose with the first. - value
-
the first
Valueinstance to compose.
Attributes
- Returns
-
an
Option[Value]containing the result of the composition, orNoneif the operation fails.
Executes a query operation on a given Value using the provided QueryFunctions. The query functions allow processing of the value based on its type (Int, Rational, or Double), returning an optional result of type T.
Executes a query operation on a given Value using the provided QueryFunctions. The query functions allow processing of the value based on its type (Int, Rational, or Double), returning an optional result of type T.
Value parameters
- functions
-
an instance of
QueryFunctions[T], which provides type-specific functions for querying integer, rational, and double values. - v
-
the
Valueto be queried.
Attributes
- Returns
-
an
Option[T]containing the result of applying the appropriate query function, orNoneif the query fails.
Evaluate a monadic operator on this, using the various functions passed in. The result is an Option[Value] rather than a Number, as in Number's doComposeMonadic.
Evaluate a monadic operator on this, using the various functions passed in. The result is an Option[Value] rather than a Number, as in Number's doComposeMonadic.
Value parameters
- functions
-
the tuple of four conversion functions.
Attributes
- Returns
-
an Option[Value] which is result of applying the appropriate function to the given value.