{"action":"created","issue":{"url":"https://api.github.com/repos/positron-lang/spec/issues/13","labels_url":"https://api.github.com/repos/positron-lang/spec/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/positron-lang/spec/issues/13/comments","events_url":"https://api.github.com/repos/positron-lang/spec/issues/13/events","html_url":"https://github.com/positron-lang/spec/issues/13","id":69567126,"number":13,"title":"Functions","user":{"login":"vinivendra","id":1630012,"avatar_url":"https://avatars.githubusercontent.com/u/1630012?v=3","gravatar_id":"","url":"https://api.github.com/users/vinivendra","html_url":"https://github.com/vinivendra","followers_url":"https://api.github.com/users/vinivendra/followers","following_url":"https://api.github.com/users/vinivendra/following{/other_user}","gists_url":"https://api.github.com/users/vinivendra/gists{/gist_id}","starred_url":"https://api.github.com/users/vinivendra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinivendra/subscriptions","organizations_url":"https://api.github.com/users/vinivendra/orgs","repos_url":"https://api.github.com/users/vinivendra/repos","events_url":"https://api.github.com/users/vinivendra/events{/privacy}","received_events_url":"https://api.github.com/users/vinivendra/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/positron-lang/spec/labels/feature","name":"feature","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":51,"created_at":"2015-04-20T11:32:18Z","updated_at":"2015-04-25T23:56:28Z","closed_at":null,"body":"A few other issues(#6, #9 and #10) have started to interfere a bit with function definitions and calls, so I think we should try defining these smaller building blocks (such as variable bindings and now functions) before moving on to greater things.\r\n\r\nLet's talk about functions!"},"comment":{"url":"https://api.github.com/repos/positron-lang/spec/issues/comments/96296289","html_url":"https://github.com/positron-lang/spec/issues/13#issuecomment-96296289","issue_url":"https://api.github.com/repos/positron-lang/spec/issues/13","id":96296289,"user":{"login":"renatocf","id":1621752,"avatar_url":"https://avatars.githubusercontent.com/u/1621752?v=3","gravatar_id":"","url":"https://api.github.com/users/renatocf","html_url":"https://github.com/renatocf","followers_url":"https://api.github.com/users/renatocf/followers","following_url":"https://api.github.com/users/renatocf/following{/other_user}","gists_url":"https://api.github.com/users/renatocf/gists{/gist_id}","starred_url":"https://api.github.com/users/renatocf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renatocf/subscriptions","organizations_url":"https://api.github.com/users/renatocf/orgs","repos_url":"https://api.github.com/users/renatocf/repos","events_url":"https://api.github.com/users/renatocf/events{/privacy}","received_events_url":"https://api.github.com/users/renatocf/received_events","type":"User","site_admin":false},"created_at":"2015-04-25T23:56:28Z","updated_at":"2015-04-25T23:56:28Z","body":"I'm still not sure if having names for everything is good. But I believe that this syntax works very well, and can map in @igorbonadio's proposal for lambdas (aka anonymous functions) in #10:\r\n```ruby\r\ndef sum(lhs: Int, rhs: Int) -> (sum: Int)\r\n    lhs + rhs\r\nend\r\n\r\nvar sum: (Int, Int) -> (Int) = [ lhs, rhs | sum = lhs + rhs ]\r\n```\r\n\r\nIn this way, **can one be defined as syntax sugar of the other?** I believe macros can handle it very well, mainly if `def` works to simplify the lambda declaration."}}