{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/memoise/issues/8","labels_url":"https://api.github.com/repos/hadley/memoise/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/hadley/memoise/issues/8/comments","events_url":"https://api.github.com/repos/hadley/memoise/issues/8/events","html_url":"https://github.com/hadley/memoise/issues/8","id":54798005,"number":8,"title":"Memoise does not cache by environments (only by arguments)","user":{"login":"peterhurford","id":5100840,"avatar_url":"https://avatars.githubusercontent.com/u/5100840?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhurford","html_url":"https://github.com/peterhurford","followers_url":"https://api.github.com/users/peterhurford/followers","following_url":"https://api.github.com/users/peterhurford/following{/other_user}","gists_url":"https://api.github.com/users/peterhurford/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhurford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhurford/subscriptions","organizations_url":"https://api.github.com/users/peterhurford/orgs","repos_url":"https://api.github.com/users/peterhurford/repos","events_url":"https://api.github.com/users/peterhurford/events{/privacy}","received_events_url":"https://api.github.com/users/peterhurford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-19T18:37:05Z","updated_at":"2016-01-22T15:58:55Z","closed_at":null,"body":"```R\r\n> fn <- function(x) x + y\r\n> environment(fn)$y <- 1\r\n> fn2 <- memoise::memoise(fn)\r\n> fn2(1)\r\n[1] 2\r\n> environment(fn)$y <- 2\r\n> fn2(1)\r\n[1] 2\r\n```"},"comment":{"url":"https://api.github.com/repos/hadley/memoise/issues/comments/173961106","html_url":"https://github.com/hadley/memoise/issues/8#issuecomment-173961106","issue_url":"https://api.github.com/repos/hadley/memoise/issues/8","id":173961106,"user":{"login":"jimhester","id":205275,"avatar_url":"https://avatars.githubusercontent.com/u/205275?v=3","gravatar_id":"","url":"https://api.github.com/users/jimhester","html_url":"https://github.com/jimhester","followers_url":"https://api.github.com/users/jimhester/followers","following_url":"https://api.github.com/users/jimhester/following{/other_user}","gists_url":"https://api.github.com/users/jimhester/gists{/gist_id}","starred_url":"https://api.github.com/users/jimhester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimhester/subscriptions","organizations_url":"https://api.github.com/users/jimhester/orgs","repos_url":"https://api.github.com/users/jimhester/repos","events_url":"https://api.github.com/users/jimhester/events{/privacy}","received_events_url":"https://api.github.com/users/jimhester/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T15:58:55Z","updated_at":"2016-01-22T15:58:55Z","body":"This is true. Do you have an example where this distinction matters in practice? This does not seem like a use case we should be worrying about IMHO. Modifying function environments post-definition is not exactly standard practice."}}