title: How to declare type of anonymous functions in Dart?
body: <p>Say I need a function passed into a method which takes a String and turns it into a double:</p>
  <pre><code>void strToDouble(String input, Function converter) {
    print('As a double, $input is ${converter(input)}`);
  }
  </code></pre>
  <p>(Obviously toy example)</p>
  <p>How can I declare the type of <code>converter</code> as a function that turns a <code>String</code> to double?</p>