I\'ve been thinking a lot lately about how to go about doing functional programming in C (not C++). Obviously, C is a procedural language and doesn\'t really support f
Functional programming is not about lambdas, it is all about pure functions. So the following broadly promote functional style:
Only use function arguments, do not use global state.
Minimise side effects i.e. printf, or any IO. Return data describing IO which can be executed instead of causing the side effects directly in all functions.
This can be achieved in plain c, no need for magic.