{"action":"created","issue":{"url":"https://api.github.com/repos/gkz/LiveScript/issues/754","labels_url":"https://api.github.com/repos/gkz/LiveScript/issues/754/labels{/name}","comments_url":"https://api.github.com/repos/gkz/LiveScript/issues/754/comments","events_url":"https://api.github.com/repos/gkz/LiveScript/issues/754/events","html_url":"https://github.com/gkz/LiveScript/issues/754","id":94444908,"number":754,"title":"Using backcalls with Promises","user":{"login":"mrmayfield","id":7200471,"avatar_url":"https://avatars.githubusercontent.com/u/7200471?v=3","gravatar_id":"","url":"https://api.github.com/users/mrmayfield","html_url":"https://github.com/mrmayfield","followers_url":"https://api.github.com/users/mrmayfield/followers","following_url":"https://api.github.com/users/mrmayfield/following{/other_user}","gists_url":"https://api.github.com/users/mrmayfield/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmayfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmayfield/subscriptions","organizations_url":"https://api.github.com/users/mrmayfield/orgs","repos_url":"https://api.github.com/users/mrmayfield/repos","events_url":"https://api.github.com/users/mrmayfield/events{/privacy}","received_events_url":"https://api.github.com/users/mrmayfield/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-11T06:32:08Z","updated_at":"2015-07-12T11:33:27Z","closed_at":null,"body":"I have some code that runs a Promise on repeat.\r\n\r\n\r\n```\r\nputOnRotation = (callback, delay) ->\r\n  return callback delay\r\n  .then (data) ->\r\n    console.log(data)\r\n    return Promise.delay(delay).then ->\r\n      return putOnRotation callback, delay\r\n  .catch (error) ->\r\n    console.log(error)\r\n    return Promise.delay(5000).then ->\r\n      return putOnRotation callback, delay\r\n```\r\n\r\nHowever, I don't like this pyramid pattern, and would prefer to use backcalls.\r\n\r\nI've ran into a litany of issues getting them set up, any ideas on how I could remove the indentation of this function using backcalls? Thanks."},"comment":{"url":"https://api.github.com/repos/gkz/LiveScript/issues/comments/120710544","html_url":"https://github.com/gkz/LiveScript/issues/754#issuecomment-120710544","issue_url":"https://api.github.com/repos/gkz/LiveScript/issues/754","id":120710544,"user":{"login":"iyel","id":929834,"avatar_url":"https://avatars.githubusercontent.com/u/929834?v=3","gravatar_id":"","url":"https://api.github.com/users/iyel","html_url":"https://github.com/iyel","followers_url":"https://api.github.com/users/iyel/followers","following_url":"https://api.github.com/users/iyel/following{/other_user}","gists_url":"https://api.github.com/users/iyel/gists{/gist_id}","starred_url":"https://api.github.com/users/iyel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iyel/subscriptions","organizations_url":"https://api.github.com/users/iyel/orgs","repos_url":"https://api.github.com/users/iyel/repos","events_url":"https://api.github.com/users/iyel/events{/privacy}","received_events_url":"https://api.github.com/users/iyel/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T11:33:27Z","updated_at":"2015-07-12T11:33:27Z","body":"@robotlolita why don't u use LS anymore?"}}