title: Elegant way of simulating lambda expression in C
body: <p>Let's consider this scenario of a C program:</p>
  
  <pre><code>RESPONSE_CALLBACK_T response_callback = &amp;response_callback_function;
  SendRequest(param1, param2, response_callback);
  </code></pre>
  
  <p>The <code>SendRequest</code> function may post some data on a webserver or call some other program modules which are supposed to trigger a callback once they complete their job. Thus, when calling this function, we need to specify a pointer to our defined callback function.</p>
  
  <p>Is there an <em>elegant</em> way of writing this code similar to a high-level OPP language that supports lambda expressions, e.g.:</p>
  
  <pre><code>SendRequest(param1, param2, function(int responseCode) { print(responseCode) });
  </code></pre>
  
  <p>How can I best simulate this behaviour?</p>