{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaDiff/ForwardDiff.jl/issues/32","labels_url":"https://api.github.com/repos/JuliaDiff/ForwardDiff.jl/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/JuliaDiff/ForwardDiff.jl/issues/32/comments","events_url":"https://api.github.com/repos/JuliaDiff/ForwardDiff.jl/issues/32/events","html_url":"https://github.com/JuliaDiff/ForwardDiff.jl/issues/32","id":99148226,"number":32,"title":"Allowing additional arguments to function being differentiated","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":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-05T08:11:24Z","updated_at":"2015-08-06T17:07:17Z","closed_at":null,"body":"I have being using ForwardDiff.jl for a while. My use case is a little bit different as I need to differentiate `f(x, args...)` only with respect to `x`. Of source, in typical usage this can be accomplished by closure. By in some instances it is not possible. \r\n\r\nI locally extended the api to allow `args...` to be passed down down (see, e.g., [here](https://github.com/gragusa/MomentBasedEstimators.jl/blob/merge_gmm_md/src/common/derivatives.jl)). \r\n\r\nI have been following the work on #27 (which is great by the way) and I was wondering whether either such extension would be possible or whether the new API will allow additional arguments. "},"comment":{"url":"https://api.github.com/repos/JuliaDiff/ForwardDiff.jl/issues/comments/128445830","html_url":"https://github.com/JuliaDiff/ForwardDiff.jl/issues/32#issuecomment-128445830","issue_url":"https://api.github.com/repos/JuliaDiff/ForwardDiff.jl/issues/32","id":128445830,"user":{"login":"mlubin","id":1733683,"avatar_url":"https://avatars.githubusercontent.com/u/1733683?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T17:07:17Z","updated_at":"2015-08-06T17:07:17Z","body":">  But the closure would be created at each iteration. Isn't this too costly?\r\n\r\nNot necessarily, and why not create the closure once instead of at each iteration?"}}