title: Arrow function is not a function
body: <p>I'm getting the error <code>TypeError: f is not a function</code> for the following: What am I doing wrong?</p>
  
  <pre><code>var expressws = require("express");
  var appws = expressws();
  var expressWs = require('express-ws')(appws);
  
  function x(ws)
  {
      console.log("send");
  }
  
  function loop(f,t)
  {
      setTimeout(() =&gt; loop(), t);
      f();
  }
  
  appws.ws('/', function(ws, req) {
      ws.on('message', function(msg){
          var data = JSON.parse(msg);
          if(data.action == "Logged in"){
              loop(() =&gt; x(ws),1000);
          }
      });
  </code></pre>
  
  <p>});</p>