title: How can I use anonymous methods in Free Pascal?
body: <p>I tried to use Delphi's syntax for anonymous methods:</p>
  
  <pre><code>type
      fun = reference to function(): Integer;
  </code></pre>
  
  <p>Fpc shows a syntax error:</p>
  
  <pre><code>Error: Identifier not found "reference"
  </code></pre>
  
  <p>What's the Free Pascal equivalent to Delphi's anonymous methods, if any?</p>