title: how to define a variable of type "function"? (using optional typing)
body: <p>In Dart, functions are first class.
  The documentation tells us that you can create a variable that is a function like this:
  </p>
  
  <pre><code>var loudify = (msg) =&gt; '!!! ${msg.toUpperCase()} !!!';
  </code></pre>
  
  <p>to create a function named "loudify" that takes a String and returns another String.<br>
  If I don't know beforehand which function I want to assign to the variable, I can do it like this:
  </p>
  
  <pre><code>// define the variable
  var loudify;
  
  // later on set the variable
  loudify = (msg) =&gt; '!!! ${msg.toUpperCase()} !!!';
  </code></pre>
  
  <p>But how do I use optional typing so that I know later on that the variable is of type "function" and has input String and output String?
  I would suggest something like this, but this doesn't work (Dart editor tells me "undefined class 'function'"):
  </p>
  
  <pre><code>// this gives a syntax error in the Dart editor
  function&lt;String, String&gt; loudify;
  </code></pre>
  
  <p>So what is the proper syntax here?<br>
  Regards,<br>
  Hendrik</p>