{"action":"created","comment":{"url":"https://api.github.com/repos/intentio-lang/reference/pulls/comments/212269376","pull_request_review_id":148860479,"id":212269376,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjI2OTM3Ng==","diff_hunk":"@@ -11,10 +11,12 @@ \\section{Functions}\n \n \\begin{bnf}\n   \\gd{fundecl} \\eq \\term{fun} \\ \\term{\\gp{id}} \\ \\term{(} \\ \\gtry{\\gp{funparams}} \\ \\term{)} \\ \\gp{braceblock} \\\\\n-  \\gd{funparams} \\eq \\term{\\gp{id}} \\ \\gmany{ \\ \\term{,} \\ \\term{\\gp{id}} \\ } \\ \\gtry{\\term{,}}\n+  \\gd{funparams} \\eq \\term{\\gp{expr}} \\ \\gmany{ \\ \\term{,} \\ \\term{expr} \\ \\term{\\gp{expr}} \\ } \\ \\gtry{\\term{,}}\n \\end{bnf}\n \n-A \\emph{function}\\index{item!function} is a named block, along with optional set of parameters. Functions are declared with the keyword \\lstinline{fun}. Function returns the result of evaluating of contained block. Functions may declare a set of input variables as parameters, through which the caller passes arguments into the function. Input variables behave the same as normal variables defined within function block.\n+A \\emph{function}\\index{item!function} is a named block, along with optional set of parameters. Functions are declared with the keyword \\lstinline{fun}. If keyword \\emph{return} is not used, the function returns the result of evaluating the last expression from the contained block. Functions may declare a set of input variables as parameters, through which the caller passes arguments into the function. Input variables behave the same as normal variables defined within a function block.\n+\n+A keyword \\lstinline{expr} before argument means that it would be evaluated. If it fails, the function will not be executed and return fail \\emph{none} term.","path":"chapters/lang/items.tex","position":19,"original_position":19,"commit_id":"2de4128361943c23da2006d5ef565361ce934e55","original_commit_id":"72c4c55cc0faf637659be2f15a22237291366b8c","user":{"login":"mkaput","id":3450050,"node_id":"MDQ6VXNlcjM0NTAwNTA=","avatar_url":"https://avatars0.githubusercontent.com/u/3450050?v=4","gravatar_id":"","url":"https://api.github.com/users/mkaput","html_url":"https://github.com/mkaput","followers_url":"https://api.github.com/users/mkaput/followers","following_url":"https://api.github.com/users/mkaput/following{/other_user}","gists_url":"https://api.github.com/users/mkaput/gists{/gist_id}","starred_url":"https://api.github.com/users/mkaput/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkaput/subscriptions","organizations_url":"https://api.github.com/users/mkaput/orgs","repos_url":"https://api.github.com/users/mkaput/repos","events_url":"https://api.github.com/users/mkaput/events{/privacy}","received_events_url":"https://api.github.com/users/mkaput/received_events","type":"User","site_admin":false},"body":"Yes but\r\n1. the grammar is totally borked, it allows only following syntax:\r\n\r\n     > fun f(`expr`, `expr`, ...)\r\n\r\n    where `expr` are plain tokens\r\n\r\n2. Behaviour description uses term `argument` on definition sites. I believe we agreed to use this on call-site, so this shouled be described along with call expressions","created_at":"2018-08-23T11:10:28Z","updated_at":"2018-08-23T11:12:20Z","html_url":"https://github.com/intentio-lang/reference/pull/3#discussion_r212269376","pull_request_url":"https://api.github.com/repos/intentio-lang/reference/pulls/3","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/intentio-lang/reference/pulls/comments/212269376"},"html":{"href":"https://github.com/intentio-lang/reference/pull/3#discussion_r212269376"},"pull_request":{"href":"https://api.github.com/repos/intentio-lang/reference/pulls/3"}},"in_reply_to_id":212228111},"pull_request":{"url":"https://api.github.com/repos/intentio-lang/reference/pulls/3","id":206492813,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NDkyODEz","html_url":"https://github.com/intentio-lang/reference/pull/3","diff_url":"https://github.com/intentio-lang/reference/pull/3.diff","patch_url":"https://github.com/intentio-lang/reference/pull/3.patch","issue_url":"https://api.github.com/repos/intentio-lang/reference/issues/3","number":3,"state":"open","locked":false,"title":"Erratum [WIP]","user":{"login":"EmilyBlood","id":18622401,"node_id":"MDQ6VXNlcjE4NjIyNDAx","avatar_url":"https://avatars1.githubusercontent.com/u/18622401?v=4","gravatar_id":"","url":"https://api.github.com/users/EmilyBlood","html_url":"https://github.com/EmilyBlood","followers_url":"https://api.github.com/users/EmilyBlood/followers","following_url":"https://api.github.com/users/EmilyBlood/following{/other_user}","gists_url":"https://api.github.com/users/EmilyBlood/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilyBlood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilyBlood/subscriptions","organizations_url":"https://api.github.com/users/EmilyBlood/orgs","repos_url":"https://api.github.com/users/EmilyBlood/repos","events_url":"https://api.github.com/users/EmilyBlood/events{/privacy}","received_events_url":"https://api.github.com/users/EmilyBlood/received_events","type":"User","site_admin":false},"body":"fix #4","created_at":"2018-08-06T19:22:25Z","updated_at":"2018-08-23T11:12:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7f1f5f93a2d9dd107b2014b1f4619d1c3e34334","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/intentio-lang/reference/pulls/3/commits","review_comments_url":"https://api.github.com/repos/intentio-lang/reference/pulls/3/comments","review_comment_url":"https://api.github.com/repos/intentio-lang/reference/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intentio-lang/reference/issues/3/comments","statuses_url":"https://api.github.com/repos/intentio-lang/reference/statuses/2de4128361943c23da2006d5ef565361ce934e55","head":{"label":"intentio-lang:erratum","ref":"erratum","sha":"2de4128361943c23da2006d5ef565361ce934e55","user":{"login":"intentio-lang","id":37938624,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTM4NjI0","avatar_url":"https://avatars0.githubusercontent.com/u/37938624?v=4","gravatar_id":"","url":"https://api.github.com/users/intentio-lang","html_url":"https://github.com/intentio-lang","followers_url":"https://api.github.com/users/intentio-lang/followers","following_url":"https://api.github.com/users/intentio-lang/following{/other_user}","gists_url":"https://api.github.com/users/intentio-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/intentio-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intentio-lang/subscriptions","organizations_url":"https://api.github.com/users/intentio-lang/orgs","repos_url":"https://api.github.com/users/intentio-lang/repos","events_url":"https://api.github.com/users/intentio-lang/events{/privacy}","received_events_url":"https://api.github.com/users/intentio-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":133226173,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMyMjYxNzM=","name":"reference","full_name":"intentio-lang/reference","owner":{"login":"intentio-lang","id":37938624,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTM4NjI0","avatar_url":"https://avatars0.githubusercontent.com/u/37938624?v=4","gravatar_id":"","url":"https://api.github.com/users/intentio-lang","html_url":"https://github.com/intentio-lang","followers_url":"https://api.github.com/users/intentio-lang/followers","following_url":"https://api.github.com/users/intentio-lang/following{/other_user}","gists_url":"https://api.github.com/users/intentio-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/intentio-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intentio-lang/subscriptions","organizations_url":"https://api.github.com/users/intentio-lang/orgs","repos_url":"https://api.github.com/users/intentio-lang/repos","events_url":"https://api.github.com/users/intentio-lang/events{/privacy}","received_events_url":"https://api.github.com/users/intentio-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intentio-lang/reference","description":"The Intentio Language Reference","fork":false,"url":"https://api.github.com/repos/intentio-lang/reference","forks_url":"https://api.github.com/repos/intentio-lang/reference/forks","keys_url":"https://api.github.com/repos/intentio-lang/reference/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intentio-lang/reference/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intentio-lang/reference/teams","hooks_url":"https://api.github.com/repos/intentio-lang/reference/hooks","issue_events_url":"https://api.github.com/repos/intentio-lang/reference/issues/events{/number}","events_url":"https://api.github.com/repos/intentio-lang/reference/events","assignees_url":"https://api.github.com/repos/intentio-lang/reference/assignees{/user}","branches_url":"https://api.github.com/repos/intentio-lang/reference/branches{/branch}","tags_url":"https://api.github.com/repos/intentio-lang/reference/tags","blobs_url":"https://api.github.com/repos/intentio-lang/reference/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intentio-lang/reference/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intentio-lang/reference/git/refs{/sha}","trees_url":"https://api.github.com/repos/intentio-lang/reference/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intentio-lang/reference/statuses/{sha}","languages_url":"https://api.github.com/repos/intentio-lang/reference/languages","stargazers_url":"https://api.github.com/repos/intentio-lang/reference/stargazers","contributors_url":"https://api.github.com/repos/intentio-lang/reference/contributors","subscribers_url":"https://api.github.com/repos/intentio-lang/reference/subscribers","subscription_url":"https://api.github.com/repos/intentio-lang/reference/subscription","commits_url":"https://api.github.com/repos/intentio-lang/reference/commits{/sha}","git_commits_url":"https://api.github.com/repos/intentio-lang/reference/git/commits{/sha}","comments_url":"https://api.github.com/repos/intentio-lang/reference/comments{/number}","issue_comment_url":"https://api.github.com/repos/intentio-lang/reference/issues/comments{/number}","contents_url":"https://api.github.com/repos/intentio-lang/reference/contents/{+path}","compare_url":"https://api.github.com/repos/intentio-lang/reference/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intentio-lang/reference/merges","archive_url":"https://api.github.com/repos/intentio-lang/reference/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intentio-lang/reference/downloads","issues_url":"https://api.github.com/repos/intentio-lang/reference/issues{/number}","pulls_url":"https://api.github.com/repos/intentio-lang/reference/pulls{/number}","milestones_url":"https://api.github.com/repos/intentio-lang/reference/milestones{/number}","notifications_url":"https://api.github.com/repos/intentio-lang/reference/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intentio-lang/reference/labels{/name}","releases_url":"https://api.github.com/repos/intentio-lang/reference/releases{/id}","deployments_url":"https://api.github.com/repos/intentio-lang/reference/deployments","created_at":"2018-05-13T10:18:37Z","updated_at":"2018-07-26T12:52:51Z","pushed_at":"2018-08-23T10:09:25Z","git_url":"git://github.com/intentio-lang/reference.git","ssh_url":"git@github.com:intentio-lang/reference.git","clone_url":"https://github.com/intentio-lang/reference.git","svn_url":"https://github.com/intentio-lang/reference","homepage":null,"size":4776,"stargazers_count":0,"watchers_count":0,"language":"TeX","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"intentio-lang:master","ref":"master","sha":"862be079c0af9fbaced41fa1ef382b596e606d6f","user":{"login":"intentio-lang","id":37938624,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTM4NjI0","avatar_url":"https://avatars0.githubusercontent.com/u/37938624?v=4","gravatar_id":"","url":"https://api.github.com/users/intentio-lang","html_url":"https://github.com/intentio-lang","followers_url":"https://api.github.com/users/intentio-lang/followers","following_url":"https://api.github.com/users/intentio-lang/following{/other_user}","gists_url":"https://api.github.com/users/intentio-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/intentio-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intentio-lang/subscriptions","organizations_url":"https://api.github.com/users/intentio-lang/orgs","repos_url":"https://api.github.com/users/intentio-lang/repos","events_url":"https://api.github.com/users/intentio-lang/events{/privacy}","received_events_url":"https://api.github.com/users/intentio-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":133226173,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMyMjYxNzM=","name":"reference","full_name":"intentio-lang/reference","owner":{"login":"intentio-lang","id":37938624,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTM4NjI0","avatar_url":"https://avatars0.githubusercontent.com/u/37938624?v=4","gravatar_id":"","url":"https://api.github.com/users/intentio-lang","html_url":"https://github.com/intentio-lang","followers_url":"https://api.github.com/users/intentio-lang/followers","following_url":"https://api.github.com/users/intentio-lang/following{/other_user}","gists_url":"https://api.github.com/users/intentio-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/intentio-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intentio-lang/subscriptions","organizations_url":"https://api.github.com/users/intentio-lang/orgs","repos_url":"https://api.github.com/users/intentio-lang/repos","events_url":"https://api.github.com/users/intentio-lang/events{/privacy}","received_events_url":"https://api.github.com/users/intentio-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intentio-lang/reference","description":"The Intentio Language Reference","fork":false,"url":"https://api.github.com/repos/intentio-lang/reference","forks_url":"https://api.github.com/repos/intentio-lang/reference/forks","keys_url":"https://api.github.com/repos/intentio-lang/reference/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intentio-lang/reference/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intentio-lang/reference/teams","hooks_url":"https://api.github.com/repos/intentio-lang/reference/hooks","issue_events_url":"https://api.github.com/repos/intentio-lang/reference/issues/events{/number}","events_url":"https://api.github.com/repos/intentio-lang/reference/events","assignees_url":"https://api.github.com/repos/intentio-lang/reference/assignees{/user}","branches_url":"https://api.github.com/repos/intentio-lang/reference/branches{/branch}","tags_url":"https://api.github.com/repos/intentio-lang/reference/tags","blobs_url":"https://api.github.com/repos/intentio-lang/reference/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intentio-lang/reference/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intentio-lang/reference/git/refs{/sha}","trees_url":"https://api.github.com/repos/intentio-lang/reference/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intentio-lang/reference/statuses/{sha}","languages_url":"https://api.github.com/repos/intentio-lang/reference/languages","stargazers_url":"https://api.github.com/repos/intentio-lang/reference/stargazers","contributors_url":"https://api.github.com/repos/intentio-lang/reference/contributors","subscribers_url":"https://api.github.com/repos/intentio-lang/reference/subscribers","subscription_url":"https://api.github.com/repos/intentio-lang/reference/subscription","commits_url":"https://api.github.com/repos/intentio-lang/reference/commits{/sha}","git_commits_url":"https://api.github.com/repos/intentio-lang/reference/git/commits{/sha}","comments_url":"https://api.github.com/repos/intentio-lang/reference/comments{/number}","issue_comment_url":"https://api.github.com/repos/intentio-lang/reference/issues/comments{/number}","contents_url":"https://api.github.com/repos/intentio-lang/reference/contents/{+path}","compare_url":"https://api.github.com/repos/intentio-lang/reference/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intentio-lang/reference/merges","archive_url":"https://api.github.com/repos/intentio-lang/reference/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intentio-lang/reference/downloads","issues_url":"https://api.github.com/repos/intentio-lang/reference/issues{/number}","pulls_url":"https://api.github.com/repos/intentio-lang/reference/pulls{/number}","milestones_url":"https://api.github.com/repos/intentio-lang/reference/milestones{/number}","notifications_url":"https://api.github.com/repos/intentio-lang/reference/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intentio-lang/reference/labels{/name}","releases_url":"https://api.github.com/repos/intentio-lang/reference/releases{/id}","deployments_url":"https://api.github.com/repos/intentio-lang/reference/deployments","created_at":"2018-05-13T10:18:37Z","updated_at":"2018-07-26T12:52:51Z","pushed_at":"2018-08-23T10:09:25Z","git_url":"git://github.com/intentio-lang/reference.git","ssh_url":"git@github.com:intentio-lang/reference.git","clone_url":"https://github.com/intentio-lang/reference.git","svn_url":"https://github.com/intentio-lang/reference","homepage":null,"size":4776,"stargazers_count":0,"watchers_count":0,"language":"TeX","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intentio-lang/reference/pulls/3"},"html":{"href":"https://github.com/intentio-lang/reference/pull/3"},"issue":{"href":"https://api.github.com/repos/intentio-lang/reference/issues/3"},"comments":{"href":"https://api.github.com/repos/intentio-lang/reference/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/intentio-lang/reference/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/intentio-lang/reference/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intentio-lang/reference/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/intentio-lang/reference/statuses/2de4128361943c23da2006d5ef565361ce934e55"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mkaput"}}