{"action":"created","issue":{"url":"https://api.github.com/repos/gkz/LiveScript/issues/669","labels_url":"https://api.github.com/repos/gkz/LiveScript/issues/669/labels{/name}","comments_url":"https://api.github.com/repos/gkz/LiveScript/issues/669/comments","events_url":"https://api.github.com/repos/gkz/LiveScript/issues/669/events","html_url":"https://github.com/gkz/LiveScript/issues/669","id":57803153,"number":669,"title":"Line feed after forward composition (>>)","user":{"login":"homam","id":922176,"avatar_url":"https://avatars.githubusercontent.com/u/922176?v=3","gravatar_id":"","url":"https://api.github.com/users/homam","html_url":"https://github.com/homam","followers_url":"https://api.github.com/users/homam/followers","following_url":"https://api.github.com/users/homam/following{/other_user}","gists_url":"https://api.github.com/users/homam/gists{/gist_id}","starred_url":"https://api.github.com/users/homam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/homam/subscriptions","organizations_url":"https://api.github.com/users/homam/orgs","repos_url":"https://api.github.com/users/homam/repos","events_url":"https://api.github.com/users/homam/events{/privacy}","received_events_url":"https://api.github.com/users/homam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-16T13:17:59Z","updated_at":"2015-02-20T07:25:49Z","closed_at":null,"body":"These three expressions are all equal to `g(f(x))`\r\n```\r\ndo -> x |> f |> g\r\n\r\ndo -> \r\n  x |>\r\n  f |>\r\n  g\r\n\r\ndo ->\r\n  x\r\n  |> f\r\n  |> g\r\n\r\ndo -> \r\n  x \r\n  |>\r\n  f \r\n  |>\r\n  g\r\n```\r\n\r\nBut if I put a line feed after forward composition and its right-side expression, I get an \"Unexpected 'COMPOSE'\" error:\r\n\r\n```\r\n# OK = λ x -> g(f(x))\r\ndo -> f >> g\r\n\r\n# compile error\r\ndo ->\r\n  f >>\r\n  g\r\n\r\n# compile error\r\ndo ->\r\n  f\r\n  >> g\r\n\r\n# compile error\r\ndo ->\r\n  f\r\n  >>\r\n  g\r\n```\r\n\r\nCan we support line feeds after compositions? It's especially useful in `Obj.map map`\r\n\r\n```\r\n[\r\n  {key: 'a', values: [1,2,3,4]}\r\n  {key: 'a', values: [5,6,8]}\r\n  {key: 'b', values: [1,2]}\r\n] \r\n|> group-by (.key)\r\n|> Obj.map map (.values) >> (map ln) >> mean\r\n\r\n# could've been\r\n...\r\n|> Obj.map map do -> \r\n  (.values)\r\n  >> map ln\r\n  >> mean\r\n```"},"comment":{"url":"https://api.github.com/repos/gkz/LiveScript/issues/comments/75199620","html_url":"https://github.com/gkz/LiveScript/issues/669#issuecomment-75199620","issue_url":"https://api.github.com/repos/gkz/LiveScript/issues/669","id":75199620,"user":{"login":"blvz","id":134438,"avatar_url":"https://avatars.githubusercontent.com/u/134438?v=3","gravatar_id":"","url":"https://api.github.com/users/blvz","html_url":"https://github.com/blvz","followers_url":"https://api.github.com/users/blvz/followers","following_url":"https://api.github.com/users/blvz/following{/other_user}","gists_url":"https://api.github.com/users/blvz/gists{/gist_id}","starred_url":"https://api.github.com/users/blvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blvz/subscriptions","organizations_url":"https://api.github.com/users/blvz/orgs","repos_url":"https://api.github.com/users/blvz/repos","events_url":"https://api.github.com/users/blvz/events{/privacy}","received_events_url":"https://api.github.com/users/blvz/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T07:25:49Z","updated_at":"2015-02-20T07:25:49Z","body":"Also\r\n\r\n```LiveScript\r\n# this works\r\nObj.map map do\r\n  mean\r\n  . (map ln)\r\n  . (.values)\r\n\r\n# this don't\r\nObj.map map do\r\n  mean\r\n  << (map ln)\r\n  << (.values)\r\n```"}}