{"action":"created","issue":{"url":"https://api.github.com/repos/hylang/hy/issues/1026","repository_url":"https://api.github.com/repos/hylang/hy","labels_url":"https://api.github.com/repos/hylang/hy/issues/1026/labels{/name}","comments_url":"https://api.github.com/repos/hylang/hy/issues/1026/comments","events_url":"https://api.github.com/repos/hylang/hy/issues/1026/events","html_url":"https://github.com/hylang/hy/issues/1026","id":139461715,"number":1026,"title":"Code manipulation does not work","user":{"login":"leiserfg","id":2947276,"avatar_url":"https://avatars.githubusercontent.com/u/2947276?v=3","gravatar_id":"","url":"https://api.github.com/users/leiserfg","html_url":"https://github.com/leiserfg","followers_url":"https://api.github.com/users/leiserfg/followers","following_url":"https://api.github.com/users/leiserfg/following{/other_user}","gists_url":"https://api.github.com/users/leiserfg/gists{/gist_id}","starred_url":"https://api.github.com/users/leiserfg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leiserfg/subscriptions","organizations_url":"https://api.github.com/users/leiserfg/orgs","repos_url":"https://api.github.com/users/leiserfg/repos","events_url":"https://api.github.com/users/leiserfg/events{/privacy}","received_events_url":"https://api.github.com/users/leiserfg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-09T02:59:15Z","updated_at":"2016-03-09T05:01:26Z","closed_at":null,"body":"Documentation said that is valid code:\r\n```lisp\r\n(defmacro rev [code]\r\n  (let [op (last code) params (list (butlast code))]\r\n  `(~op ~@params)))\r\n (rev (1 2 3 +))\r\n```\r\nbut I run that and this is the result:\r\n```lisp\r\n(rev (1 2 3 +))\r\n  ^-------------^\r\nHyMacroExpansionError: expanding `rev': TypeError(\"'map' object is not callable\",)\r\n```"},"comment":{"url":"https://api.github.com/repos/hylang/hy/issues/comments/194114002","html_url":"https://github.com/hylang/hy/issues/1026#issuecomment-194114002","issue_url":"https://api.github.com/repos/hylang/hy/issues/1026","id":194114002,"user":{"login":"tuturto","id":1389385,"avatar_url":"https://avatars.githubusercontent.com/u/1389385?v=3","gravatar_id":"","url":"https://api.github.com/users/tuturto","html_url":"https://github.com/tuturto","followers_url":"https://api.github.com/users/tuturto/followers","following_url":"https://api.github.com/users/tuturto/following{/other_user}","gists_url":"https://api.github.com/users/tuturto/gists{/gist_id}","starred_url":"https://api.github.com/users/tuturto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuturto/subscriptions","organizations_url":"https://api.github.com/users/tuturto/orgs","repos_url":"https://api.github.com/users/tuturto/repos","events_url":"https://api.github.com/users/tuturto/events{/privacy}","received_events_url":"https://api.github.com/users/tuturto/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T05:01:26Z","updated_at":"2016-03-09T05:01:26Z","body":"Syntax of ``let`` has changed between current stable version and the development version found in master. This will work\r\n\r\n```hylang\r\n(defmacro rev [code]\r\n   (let [[op (last code)]\r\n         [params (list (butlast code))]]\r\n   `(~op ~@params)))\r\n\r\n(rev (1 2 3 +))\r\n```\r\n\r\nDocumentation for stable is at: http://docs.hylang.org/en/stable/index.html and should be valid. I scanned through the documentation of current stable branch and didn't find errors in macro definitions there. However, if you spot an error there, do let us know about the error and location in docs and it'll get fixed. Or submit a PR for fix, we're more than happy to have help with the project."}}