Translate the example from JS to Coffee