title: What is the dart function type syntax for variable declaration?
body: <p>I know you can specify function types in formal arg list, but how would I do this for instance variables? I would like to do this:</p>
  
  <pre class="lang-dart prettyprint-override"><code>class A&lt;T&gt; {
    int compare(T a, T b);
  }
  </code></pre>
  
  <p>where compare is a function variable with the appropriate type. I would like to be able to write:</p>
  
  <pre class="lang-dart prettyprint-override"><code>A a = new A();
  a.compare = ...
  </code></pre>