VariableList

From OpenCog
Jump to: navigation, search

A VariableList is a type of ConnectorSeq used to declare a list of variables. It can be used to define a signature for a LambdaLink or a QueryLink. A variable list consists entirely of a set of variable and variable type declarations, and nothing more.

A VariableList is always an oprdered sequence; a VariableSet is the same, but unordered.

For example:

VariableList
   VariableNode "$A"
   VariableNode "$B"

declares an argument list consisting of two arguments. A more complex example, consisting of type declarations for the variables, would be:

  VariableList
      TypedVariableLink
         VariableNode "$F"
         TypeNode 'ConceptNode
      TypedVariableLink
         VariableNode "$C"
         TypeNode 'ConceptNode

declares a signature where both arguments must be ConceptNodes.

See Also