{"action":"created","issue":{"url":"https://api.github.com/repos/gragusa/GMM.jl/issues/14","labels_url":"https://api.github.com/repos/gragusa/GMM.jl/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/gragusa/GMM.jl/issues/14/comments","events_url":"https://api.github.com/repos/gragusa/GMM.jl/issues/14/events","html_url":"https://github.com/gragusa/GMM.jl/issues/14","id":75494336,"number":14,"title":"Moment function closure","user":{"login":"gragusa","id":512386,"avatar_url":"https://avatars.githubusercontent.com/u/512386?v=3","gravatar_id":"","url":"https://api.github.com/users/gragusa","html_url":"https://github.com/gragusa","followers_url":"https://api.github.com/users/gragusa/followers","following_url":"https://api.github.com/users/gragusa/following{/other_user}","gists_url":"https://api.github.com/users/gragusa/gists{/gist_id}","starred_url":"https://api.github.com/users/gragusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gragusa/subscriptions","organizations_url":"https://api.github.com/users/gragusa/orgs","repos_url":"https://api.github.com/users/gragusa/repos","events_url":"https://api.github.com/users/gragusa/events{/privacy}","received_events_url":"https://api.github.com/users/gragusa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gragusa/GMM.jl/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-12T07:08:21Z","updated_at":"2015-05-14T14:48:32Z","closed_at":null,"body":"The way in which we handle the moment function right now is not satisfactory. We can define `g(theta, data)` and the code create a closure such that we can call g(theta). However, when this function is stored in the GMMResult type the closure cannot access `data`. "},"comment":{"url":"https://api.github.com/repos/gragusa/GMM.jl/issues/comments/102059335","html_url":"https://github.com/gragusa/GMM.jl/issues/14#issuecomment-102059335","issue_url":"https://api.github.com/repos/gragusa/GMM.jl/issues/14","id":102059335,"user":{"login":"gragusa","id":512386,"avatar_url":"https://avatars.githubusercontent.com/u/512386?v=3","gravatar_id":"","url":"https://api.github.com/users/gragusa","html_url":"https://github.com/gragusa","followers_url":"https://api.github.com/users/gragusa/followers","following_url":"https://api.github.com/users/gragusa/following{/other_user}","gists_url":"https://api.github.com/users/gragusa/gists{/gist_id}","starred_url":"https://api.github.com/users/gragusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gragusa/subscriptions","organizations_url":"https://api.github.com/users/gragusa/orgs","repos_url":"https://api.github.com/users/gragusa/repos","events_url":"https://api.github.com/users/gragusa/events{/privacy}","received_events_url":"https://api.github.com/users/gragusa/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T14:48:32Z","updated_at":"2015-05-14T14:48:32Z","body":"What I meant to say is that we could also store the data --- storing only the closure without the data may be too big of a loss of information. "}}