AsTMa? Concepts: Functions
Function provenience:
- encapsulate particular functional behaviour
- can be predefined: from the package standard
- can be imported via the evaluation context: association via a prefix like in XML
- can be user-defined within the query
Structure
- name
- parameter and result profile: via types
- expect parameters with the correct types
- return a value with the correct type
Scope
- functions are only visible in the scope where they are defined, no namespace pollution
- formal parameters are only visible in the scope of the defined function
Limitations
- functions are NOT objects: no passing around of function objects
- no lazy evaluation defined (yet)
- no closures (incompletely evaluated functions) defined (yet)