Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a Coffee syntax thing.

  ws.on 'close', -> ps.kill()
That compiles to:

  ws.on('close', function() {
    return ps.kill();
  });


I have never done any Coffee but it looks like arguments are separated by commas, and, in this case, the second argument is a function of no argument (so the left hand side of the arrow is empty).

Edit: it was meant to be a reply to the parent.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: