{"action":"created","issue":{"url":"https://api.github.com/repos/1-liners/1-liners/issues/163","repository_url":"https://api.github.com/repos/1-liners/1-liners","labels_url":"https://api.github.com/repos/1-liners/1-liners/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/1-liners/1-liners/issues/163/comments","events_url":"https://api.github.com/repos/1-liners/1-liners/issues/163/events","html_url":"https://github.com/1-liners/1-liners/issues/163","id":169800544,"number":163,"title":"When should I use always","user":{"login":"srinivasdamam","id":13461208,"avatar_url":"https://avatars.githubusercontent.com/u/13461208?v=3","gravatar_id":"","url":"https://api.github.com/users/srinivasdamam","html_url":"https://github.com/srinivasdamam","followers_url":"https://api.github.com/users/srinivasdamam/followers","following_url":"https://api.github.com/users/srinivasdamam/following{/other_user}","gists_url":"https://api.github.com/users/srinivasdamam/gists{/gist_id}","starred_url":"https://api.github.com/users/srinivasdamam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinivasdamam/subscriptions","organizations_url":"https://api.github.com/users/srinivasdamam/orgs","repos_url":"https://api.github.com/users/srinivasdamam/repos","events_url":"https://api.github.com/users/srinivasdamam/events{/privacy}","received_events_url":"https://api.github.com/users/srinivasdamam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-07T15:07:38Z","updated_at":"2016-08-07T16:10:04Z","closed_at":null,"body":"```\r\n1. const twentyFour = 24;\r\n2. const twentyFour = always(24)\r\n```\r\n1 and 2 does the same job. I'm curious to know if any advantages of using `always` in this context.  And I have to call `twentyFour()` every time i need it. "},"comment":{"url":"https://api.github.com/repos/1-liners/1-liners/issues/comments/238091032","html_url":"https://github.com/1-liners/1-liners/issues/163#issuecomment-238091032","issue_url":"https://api.github.com/repos/1-liners/1-liners/issues/163","id":238091032,"user":{"login":"guumaster","id":765396,"avatar_url":"https://avatars.githubusercontent.com/u/765396?v=3","gravatar_id":"","url":"https://api.github.com/users/guumaster","html_url":"https://github.com/guumaster","followers_url":"https://api.github.com/users/guumaster/followers","following_url":"https://api.github.com/users/guumaster/following{/other_user}","gists_url":"https://api.github.com/users/guumaster/gists{/gist_id}","starred_url":"https://api.github.com/users/guumaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guumaster/subscriptions","organizations_url":"https://api.github.com/users/guumaster/orgs","repos_url":"https://api.github.com/users/guumaster/repos","events_url":"https://api.github.com/users/guumaster/events{/privacy}","received_events_url":"https://api.github.com/users/guumaster/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T16:10:04Z","updated_at":"2016-08-07T16:10:04Z","body":"Well, 1 and 2 are actually different. `always(24)` returns a function that always return 24. So with `twentyFour` from the second line, you can compose new functions.\r\n\r\nSilly example, but say that you need to fill an array with 24. You can do it this way: \r\n\r\n```js\r\nconst twentyFour = always(24)\r\n\r\nconst myList = range(1, 10) // => [1,2,3..,9, 10]\r\n\r\nconst myTwentyFourList = map(twentyFour, myList) // => [24, 24, 24,.... 24] ten times\r\n```\r\n\r\nThat's the difference.\r\n\r\n"}}
{"actor":{"display_login":"guumaster"}}