{"action":"created","issue":{"url":"https://api.github.com/repos/andrewplummer/Sugar/issues/465","labels_url":"https://api.github.com/repos/andrewplummer/Sugar/issues/465/labels{/name}","comments_url":"https://api.github.com/repos/andrewplummer/Sugar/issues/465/comments","events_url":"https://api.github.com/repos/andrewplummer/Sugar/issues/465/events","html_url":"https://github.com/andrewplummer/Sugar/issues/465","id":43243718,"number":465,"title":"Expose operators as functions?","user":{"login":"vendethiel","id":199499,"avatar_url":"https://avatars.githubusercontent.com/u/199499?v=3","gravatar_id":"","url":"https://api.github.com/users/vendethiel","html_url":"https://github.com/vendethiel","followers_url":"https://api.github.com/users/vendethiel/followers","following_url":"https://api.github.com/users/vendethiel/following{/other_user}","gists_url":"https://api.github.com/users/vendethiel/gists{/gist_id}","starred_url":"https://api.github.com/users/vendethiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vendethiel/subscriptions","organizations_url":"https://api.github.com/users/vendethiel/orgs","repos_url":"https://api.github.com/users/vendethiel/repos","events_url":"https://api.github.com/users/vendethiel/events{/privacy}","received_events_url":"https://api.github.com/users/vendethiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-09-19T14:24:02Z","updated_at":"2015-01-21T16:14:37Z","closed_at":null,"body":"Something I **really**, **really** miss in SugarJS and I have in LS: operators as functions.\r\n\r\ni.e.:\r\n\r\n```\r\n[\"1.4\", \"2.3\", \"5\", \"\"].map(unary('+'))\r\n```\r\n\r\nNot sure how it should look like. But please :). In LiveScript, I can just do `(+)` (works wonders with sugar, though I really like prelude-ls that's meant to be used with it)"},"comment":{"url":"https://api.github.com/repos/andrewplummer/Sugar/issues/comments/70866181","html_url":"https://github.com/andrewplummer/Sugar/issues/465#issuecomment-70866181","issue_url":"https://api.github.com/repos/andrewplummer/Sugar/issues/465","id":70866181,"user":{"login":"vendethiel","id":199499,"avatar_url":"https://avatars.githubusercontent.com/u/199499?v=3","gravatar_id":"","url":"https://api.github.com/users/vendethiel","html_url":"https://github.com/vendethiel","followers_url":"https://api.github.com/users/vendethiel/followers","following_url":"https://api.github.com/users/vendethiel/following{/other_user}","gists_url":"https://api.github.com/users/vendethiel/gists{/gist_id}","starred_url":"https://api.github.com/users/vendethiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vendethiel/subscriptions","organizations_url":"https://api.github.com/users/vendethiel/orgs","repos_url":"https://api.github.com/users/vendethiel/repos","events_url":"https://api.github.com/users/vendethiel/events{/privacy}","received_events_url":"https://api.github.com/users/vendethiel/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T16:14:37Z","updated_at":"2015-01-21T16:14:37Z","body":"`Function['+']` could either mean `x + y` or `+ y`\r\n\r\nand then we have two choices : \r\n\r\n- do we want it to curry\r\n- do we want it to dispatch on arity\r\n\r\nif we go for the first, `Function['+'](1)(2)` would be 3.\r\nIf we go for the second, `Function1['+'](1, 2)` would be 3, but `Function['+'](\"0.5\")` would be `0.5`\r\n\r\nthe idea here was to `parseInt` on those, so the curry version looks more interesting.\r\nThis means that\r\n\r\n`[\"1.0\", \"3.4\", \"5.4\"].map(Function['+'])` would be an array of 1-ary functions (waiting to receive their 2nd argument)."}}