A Composition_of_function is a relationship between
EXAMPLE - The relationship between the functions f, g and h, such that:
f(x)=g( h(x)), for each x in the domain of f
is a Composition_of_function, where:
- f is the result;
- h is operand 1; and
- g is operand 2.
EXPRESS specification:
*)
ENTITY composition_of_function
result : maths_function);
operands : LIST [2:?] OF maths_function;
DERIVE
self\maths_function.domain : Maths_space
:= operands[1].domain;
self\maths_function.range : Maths_space
:= operands[SIZEOF(operands)].range;
WHERE
proper_sequence : composable_sequence (operands);
END_ENTITY;
(*
Attribute definitions:
result: the Maths_function that is obtained by concatenating the operands.
operands: the instances of Maths_function that are concatenated to be the result.