QUDT logo

qudt:AlgebraicDatatype

http://qudt.org/schema/qudt/AlgebraicDatatype
All OWL view SHACL view
Types: owl:Class, rdfs:Class, sh:NodeShape
PredicateObject
rdf:type owl:Class
rdf:type rdfs:Class
rdf:type sh:NodeShape
dcterms:description

An Algebraic Datatype is a datatype each of whose values are data from other data types wrapped in one of the constructors of the data type. Any wrapped datum is an argument to the constructor. In contrast to other data types, the constructor is not executed and the only way to operate on the data is to unwrap the constructor using pattern matching.

The most common algebraic data type is a list with two constructors: Nil or [] for an empty list, and Cons (an abbreviation of constructor), ::, or : for the combination of a new element with a shorter list (for example (Cons 1 '(2 3 4)) or 1:[2,3,4]).

Special cases of algebraic types are product types i.e. records (only one constructor) and enumerated types (many constructors with no arguments). Algebraic types are one kind of composite type (i.e. a type formed by combining other types).

An algebraic data type may also be an abstract data type (ADT) if it is exported from a module without its constructors. Values of such a type can only be manipulated using functions defined in the same module as the type itself.

prov:wasInfluencedBy http://en.wikipedia.org/wiki/Algebraic_data_type
rdfs:isDefinedBy http://qudt.org/3.5.2/schema/datatype
rdfs:isDefinedBy http://qudt.org/3.5.2/schema/shacl/datatype
rdfs:label “Algebraic Datatype”
rdfs:seeAlso qudt:AbstractDatatype
rdfs:subClassOf qudt:StructuredDatatype
Generated 2026-09-22T13:15:48.343+00:00