Plange


Outline

<Type^n * ReturnType → Type> TypedFunction :=  {
    return type inheriting GenericFunction {
        <Type> returnType := params[params.length - 1];
        <Array<Parameter>> parameters := { Parameter<T> where (_, T) ∈ params };
    };
};

GenericFunction := type inheriting Scope {
    <Type> returnType;
    <Array<Parameter>> parameters;
    <String> name;
}

Function := TypedFunction + GenericFunction;
            

copyright © Brent Lewis 2017