PreviousUpNext

10.10.6  List Types

The length of a list is not part of its type, but the type of its elements is. All elements of a list must be of the same type.

List types are written using the type constructor List together with an argument giving the type of the list elements:

    Int_List    = List(Int);
    Float_List  = List(Float);
    String_List = List(String);
    Record_List = List(My_Complex_Record_Type);

List types, like all types, may be nested arbitrarily:

    My_List_Of_Int_Lists_Type = List(List(Int));

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext