{"action":"opened","issue":{"url":"https://api.github.com/repos/mathics/Mathics/issues/513","repository_url":"https://api.github.com/repos/mathics/Mathics","labels_url":"https://api.github.com/repos/mathics/Mathics/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/mathics/Mathics/issues/513/comments","events_url":"https://api.github.com/repos/mathics/Mathics/issues/513/events","html_url":"https://github.com/mathics/Mathics/issues/513","id":173940261,"number":513,"title":"`Return` behaves incorrectly with nested function calls","user":{"login":"sn6uv","id":1217643,"avatar_url":"https://avatars.githubusercontent.com/u/1217643?v=3","gravatar_id":"","url":"https://api.github.com/users/sn6uv","html_url":"https://github.com/sn6uv","followers_url":"https://api.github.com/users/sn6uv/followers","following_url":"https://api.github.com/users/sn6uv/following{/other_user}","gists_url":"https://api.github.com/users/sn6uv/gists{/gist_id}","starred_url":"https://api.github.com/users/sn6uv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sn6uv/subscriptions","organizations_url":"https://api.github.com/users/sn6uv/orgs","repos_url":"https://api.github.com/users/sn6uv/repos","events_url":"https://api.github.com/users/sn6uv/events{/privacy}","received_events_url":"https://api.github.com/users/sn6uv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mathics/Mathics/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-30T06:33:42Z","updated_at":"2016-08-30T06:33:42Z","closed_at":null,"body":"`Return` should only return from the enclosing function and not the entire evaluation chain.\r\n\r\nHere's an example:\r\n```\r\nIn[1]:= f[x_] := Return[x];\r\nIn[2]:= g[y_] := Module[{}, z = f[y]; 2]\r\n\r\nIn[3]:= g[1]\r\nOut[3]= 1\r\n```\r\n\r\nAs defined, `g` should always return `2` (not `1`)."}}
{"actor":{"display_login":"sn6uv"}}