| 163 | | * The difference between the function type and map type: a function is really a procedure in the language, so it can modify the state as well as return a value. This is like the C notion of "function". A map is a logical partial function: it is defined on some subset of the domain type, it will always "return" the same value on a given input, and reading it cannot modify the state. |
| | 163 | * The difference between the function type and map type: |
| | 164 | * a function cannot return a function; nor can a function consume an argument of functional type |
| | 165 | * a function may return a pointer to a function and may consume an argument of type pointer to function... |
| | 166 | * a function pointer is formed by `&f`, where `f` is the name of a function |
| | 167 | * there is no pointer arithmetic on function pointers |
| | 168 | * a map has a finite number of entries |
| | 169 | * a map cannot be executed in a call or spawn; nor can functions on maps have any side effects |
| | 170 | * a function can return a map and can consume an argument of map type |
| | 171 | |