{"action":"created","issue":{"url":"https://api.github.com/repos/stoeffel/chickencurry/issues/17","labels_url":"https://api.github.com/repos/stoeffel/chickencurry/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/stoeffel/chickencurry/issues/17/comments","events_url":"https://api.github.com/repos/stoeffel/chickencurry/issues/17/events","html_url":"https://github.com/stoeffel/chickencurry/issues/17","id":98178378,"number":17,"title":"How do we handle implicit arity?","user":{"login":"tomekwi","id":4624660,"avatar_url":"https://avatars.githubusercontent.com/u/4624660?v=3","gravatar_id":"","url":"https://api.github.com/users/tomekwi","html_url":"https://github.com/tomekwi","followers_url":"https://api.github.com/users/tomekwi/followers","following_url":"https://api.github.com/users/tomekwi/following{/other_user}","gists_url":"https://api.github.com/users/tomekwi/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekwi/subscriptions","organizations_url":"https://api.github.com/users/tomekwi/orgs","repos_url":"https://api.github.com/users/tomekwi/repos","events_url":"https://api.github.com/users/tomekwi/events{/privacy}","received_events_url":"https://api.github.com/users/tomekwi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-30T14:06:21Z","updated_at":"2015-07-30T14:35:09Z","closed_at":null,"body":"We want the API to be explicit and easy to use. I would do it like this:\r\n\r\n```js\r\nconst f = (a, b, c) => …;  // f.length === 3\r\n```\r\n\r\nAPI call          | Implied length\r\n------------------|------------------\r\n`f::curry()` | 3\r\n`f::curry(1)` | 3\r\n`f::curry(_, 1)` | 3\r\n`f::curry(_, 1, 2)` | 3\r\n`f::curry(_, 1, 2, _)` | 4\r\n`f::curry(_, _, _, _, _)` | 5\r\n`f::curry(_, _, _, _, _, _)` | 6\r\n\r\nSo, summing up, `f::curry(...args)` assumes the arity of `f` to be `Math.max(f.length, args.length)`.\r\n\r\nIn any case `::curry` returns a Haskell-like fixed-arity function with auto currying.\r\n\r\nDoes that [convince you](https://github.com/stoeffel/chickencurry/issues/11#issue-97704456), @jussi-kalliokoski? Perhaps the name `curry` is wrong?"},"comment":{"url":"https://api.github.com/repos/stoeffel/chickencurry/issues/comments/126349787","html_url":"https://github.com/stoeffel/chickencurry/issues/17#issuecomment-126349787","issue_url":"https://api.github.com/repos/stoeffel/chickencurry/issues/17","id":126349787,"user":{"login":"tomekwi","id":4624660,"avatar_url":"https://avatars.githubusercontent.com/u/4624660?v=3","gravatar_id":"","url":"https://api.github.com/users/tomekwi","html_url":"https://github.com/tomekwi","followers_url":"https://api.github.com/users/tomekwi/followers","following_url":"https://api.github.com/users/tomekwi/following{/other_user}","gists_url":"https://api.github.com/users/tomekwi/gists{/gist_id}","starred_url":"https://api.github.com/users/tomekwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomekwi/subscriptions","organizations_url":"https://api.github.com/users/tomekwi/orgs","repos_url":"https://api.github.com/users/tomekwi/repos","events_url":"https://api.github.com/users/tomekwi/events{/privacy}","received_events_url":"https://api.github.com/users/tomekwi/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T14:35:09Z","updated_at":"2015-07-30T14:35:09Z","body":"And one more table:\r\n\r\nAPI call          | `g.length`\r\n------------------|----\r\n`g = f::curry()` | 3\r\n`g = f::curry(1)` | 2\r\n`g = f::curry(_, 1)` | 2\r\n`g = f::curry(_, 1, 2)` | 1\r\n`g = f::curry(_, 1, 2, _)` | 2\r\n`g = f::curry(_, _, _, _, _)` | 5\r\n`g = f::curry(_, _, _, _, _, _)` | 6"}}