Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C is also a functional programming language

Name: Anonymous 2013-11-18 10:44

Why not? I can just avoid side-effects. I can also treat functions as first-order data using Function pointers.

Name: Anonymous 2013-11-20 21:06

>>11
By representing a closure as a structure with the args that have been filled in plus the function pointer. Every time you curry another argument onto the function, you fill in another field of the arg structure, and when they're all completed you apply the closure. It won't give you the sexy syntax of Haskell where making a closure is the same as just stopping a function call midway through, but it will allow you to fill in arguments in any order and modify arguments all you want prior to actual application.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List