Function composition: Difference between revisions

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, althoughif the result of composition is to be called like an ordinary function. However, the [[#C|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 areis systemat least one platform-dependent librarieslibrary thatfor cancreating createa closures"true" forclosure in C.
 
In ATS we have closures, but of more than one kind.
 
<lang ats>(*
1,448

edits