next up previous
Next: Pragma for priority Up: Syntax of KL1 Previous: Variable

List

Basically, we do not use ``array'' data structure in KL1. Instead, ``list'' data structure is often used. List operation is very fast in KL1. However, if one wants to randomly access an element in structured data, one can use structured data called vector and functor. Vector is literally vector in terms of mathematics. Functor is one of structured data in logic programming languages. For example:

tree(Root,Branch_Length1,Branch_Length2,Tree1,Tree2)

represents a rooted tree. Tree1 and Tree2 are also functor which have the same structure as the above functor.

Vector directly corresponds to array data structure in procedural languages.


Satoshi OOta
1999-03-06