Constructor

Syntax call
Constructor[
[Graphics:Termsgr20.gif] , ... , [Graphics:Termsgr21.gif]]
Input
a sequence [Graphics:Termsgr22.gif], ... , [Graphics:Termsgr23.gif] of Mathematica expressions. [Graphics:Termsgr24.gif] is either a Mathematica symbol [Graphics:Termsgr25.gif]
or a type signature [Graphics:Termsgr26.gif]"7[Graphics:Termsgr27.gif]
Output
the list { [Graphics:Termsgr28.gif], ... , [Graphics:Termsgr29.gif]} where 1<= [Graphics:Termsgr30.gif]"ï<=[Graphics:Termsgr31.gif]<=n such that [Graphics:Termsgr32.gif] is not an already declared function symbol
Effect
declare [Graphics:Termsgr33.gif], ... , [Graphics:Termsgr34.gif]as constructors by extending the default definition of IsConstructor, append [Graphics:Termsgr35.gif] to
$FunctionSymbol, and define the Arity[[Graphics:Termsgr36.gif]] accordingly;
if [Graphics:Termsgr37.gif][Graphics:Termsgr38.gif] then assign to [Graphics:Termsgr39.gif] a unique constant type
else [Graphics:Termsgr40.gif][Graphics:Termsgr41.gif]"7[Graphics:Termsgr42.gif] and then assign to [Graphics:Termsgr43.gif] the type ∀[Graphics:Termsgr44.gif].
Implementation

[Graphics:Termsgr2.gif][Graphics:Termsgr45.gif]