- Up - | Next >> |
Feature 'import'
is a record with label 'import'
describing the module's imports: we will see later what these are, but here there none, so the record is empty.
Feature 'export'
is a record with label 'export'
describing what is a exported by the module. Here, there is only one feature called greetings
and the value associated with it in the export record is atom
, which is simply some type information inferred by the compiler.
Feature apply
contains a function to create the module's exports given its imports. In the case of our functor above, the function is essentially the following:
declare
fun {$ Imports}
Greetings = 'hello world'
in
'exports'(greeting:Greetings)
end
- Up - | Next >> |