{"action":"created","issue":{"url":"https://api.github.com/repos/probmods/webppl/issues/161","labels_url":"https://api.github.com/repos/probmods/webppl/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/probmods/webppl/issues/161/comments","events_url":"https://api.github.com/repos/probmods/webppl/issues/161/events","html_url":"https://github.com/probmods/webppl/pull/161","id":100582478,"number":161,"title":"Combine duplicated isErp functions.","user":{"login":"null-a","id":9109012,"avatar_url":"https://avatars.githubusercontent.com/u/9109012?v=3","gravatar_id":"","url":"https://api.github.com/users/null-a","html_url":"https://github.com/null-a","followers_url":"https://api.github.com/users/null-a/followers","following_url":"https://api.github.com/users/null-a/following{/other_user}","gists_url":"https://api.github.com/users/null-a/gists{/gist_id}","starred_url":"https://api.github.com/users/null-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/null-a/subscriptions","organizations_url":"https://api.github.com/users/null-a/orgs","repos_url":"https://api.github.com/users/null-a/repos","events_url":"https://api.github.com/users/null-a/events{/privacy}","received_events_url":"https://api.github.com/users/null-a/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-12T16:27:49Z","updated_at":"2015-08-12T17:39:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/probmods/webppl/pulls/161","html_url":"https://github.com/probmods/webppl/pull/161","diff_url":"https://github.com/probmods/webppl/pull/161.diff","patch_url":"https://github.com/probmods/webppl/pull/161.patch"},"body":"I need `isErp` in #64 so it would be nice to put it somewhere re-usable.\r\n\r\nI considered putting it in `erp.js` rather than `util.js` but that felt a little odd because `isErp` becomes available at the top-level in webppl code but it isn't in CPS. I'm open to better suggestions if you have any?\r\n\r\nI've checked this works from the command line with and without the `--compile` option.\r\n\r\nA nice (though small) side-effect of this is I think we could use `util.isErp` in dippl [here](https://github.com/probmods/dippl/blob/15257640c73961cb7f38285347389ffa88f37e9d/assets/js/custom.js#L16).\r\n"},"comment":{"url":"https://api.github.com/repos/probmods/webppl/issues/comments/130386146","html_url":"https://github.com/probmods/webppl/pull/161#issuecomment-130386146","issue_url":"https://api.github.com/repos/probmods/webppl/issues/161","id":130386146,"user":{"login":"null-a","id":9109012,"avatar_url":"https://avatars.githubusercontent.com/u/9109012?v=3","gravatar_id":"","url":"https://api.github.com/users/null-a","html_url":"https://github.com/null-a","followers_url":"https://api.github.com/users/null-a/followers","following_url":"https://api.github.com/users/null-a/following{/other_user}","gists_url":"https://api.github.com/users/null-a/gists{/gist_id}","starred_url":"https://api.github.com/users/null-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/null-a/subscriptions","organizations_url":"https://api.github.com/users/null-a/orgs","repos_url":"https://api.github.com/users/null-a/repos","events_url":"https://api.github.com/users/null-a/events{/privacy}","received_events_url":"https://api.github.com/users/null-a/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T17:39:22Z","updated_at":"2015-08-12T17:39:22Z","body":"> maybe figuring out the right place for these functions is a separate issue\r\n\r\nFair enough.\r\n\r\n> Also, would it make sense to define isErp as follows?\r\n\r\nI did go that way in #64 originally, but came away from it as `isErp(withImportanceDist(...)) == false`.\r\n"}}