{"action":"opened","issue":{"url":"https://api.github.com/repos/gcanti/fp-ts/issues/469","repository_url":"https://api.github.com/repos/gcanti/fp-ts","labels_url":"https://api.github.com/repos/gcanti/fp-ts/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/gcanti/fp-ts/issues/469/comments","events_url":"https://api.github.com/repos/gcanti/fp-ts/issues/469/events","html_url":"https://github.com/gcanti/fp-ts/issues/469","id":328966083,"node_id":"MDU6SXNzdWUzMjg5NjYwODM=","number":469,"title":"[Feature] : foldR on Array","user":{"login":"PierreCooper","id":20277592,"node_id":"MDQ6VXNlcjIwMjc3NTky","avatar_url":"https://avatars1.githubusercontent.com/u/20277592?v=4","gravatar_id":"","url":"https://api.github.com/users/PierreCooper","html_url":"https://github.com/PierreCooper","followers_url":"https://api.github.com/users/PierreCooper/followers","following_url":"https://api.github.com/users/PierreCooper/following{/other_user}","gists_url":"https://api.github.com/users/PierreCooper/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreCooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreCooper/subscriptions","organizations_url":"https://api.github.com/users/PierreCooper/orgs","repos_url":"https://api.github.com/users/PierreCooper/repos","events_url":"https://api.github.com/users/PierreCooper/events{/privacy}","received_events_url":"https://api.github.com/users/PierreCooper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-04T08:58:36Z","updated_at":"2018-06-04T08:58:36Z","closed_at":null,"author_association":"NONE","body":"It could be interesting to have a foldR function on Array. I had to implement my own function, like this :\r\n```typescript\r\nexport const foldrL = <A, B>(as: Array<A>, nil: () => B, cons: (init: Array<A>, last: A) => B): B =>\r\n  isEmpty(as) ? nil() : cons(as.slice(0, as.length - 1), as[as.length - 1])\r\n```\r\n"}}
{"actor":{"display_login":"PierreCooper"}}