title: Typescript map over list of functions
body: <p>Coming from a Haskell background, I would like to map over a list of functions. For example I have:</p>
  
  <pre><code>functions fnA(x){ return true }
  function  fnB(x){ return false }
  
  // I would like to write this code that applies the same value to all functions
  [ fnA, fnB ] .map ( (fn : any) =&gt; fn('hello world') )
  </code></pre>
  
  <p>However I am getting error:</p>
  
  <pre><code>(x : any) =&gt; boolean' cannot be used as an index type.
  </code></pre>