Function composition: Difference between revisions

m
Line 377:
That '''compose''' should return ''a new function'', which will exist independently of '''compose''' once created. A person should never have to call '''compose''' merely to get the result of the composed computation.
 
Thus it is probably impossible, for instance, to ''really'' satisfy the requirement in standard C, if the result of composition is to be called like an ordinary function. However, the [[#C|the C]] solution]] shows it is possible, ''if'' the notion of a function is expanded to include structures requiring more than just a plain C function call. Also, there is at least one platform-dependent library for creating a "true" closure in C.
 
In ATS we have closures, but of more than one kind.
1,448

edits