{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/990","labels_url":"https://api.github.com/repos/lodash/lodash/issues/990/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/990/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/990/events","html_url":"https://github.com/lodash/lodash/issues/990","id":58558197,"number":990,"title":"Chaining takeWhile and last does not work","user":{"login":"niom","id":980731,"avatar_url":"https://avatars.githubusercontent.com/u/980731?v=3","gravatar_id":"","url":"https://api.github.com/users/niom","html_url":"https://github.com/niom","followers_url":"https://api.github.com/users/niom/followers","following_url":"https://api.github.com/users/niom/following{/other_user}","gists_url":"https://api.github.com/users/niom/gists{/gist_id}","starred_url":"https://api.github.com/users/niom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niom/subscriptions","organizations_url":"https://api.github.com/users/niom/orgs","repos_url":"https://api.github.com/users/niom/repos","events_url":"https://api.github.com/users/niom/events{/privacy}","received_events_url":"https://api.github.com/users/niom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-23T08:47:21Z","updated_at":"2015-02-25T10:46:43Z","closed_at":"2015-02-23T10:05:19Z","body":"When using chaining with takeWhile and last return undefined instead of the correct value.\r\n\r\nexample:\r\n```javascript \r\n    _\r\n    .chain([1, 2, 3])\r\n    .takeWhile(function(item) {\r\n        return item < 3\r\n    })\r\n    .last()\r\n    .value()\r\n    // ==> undefined\r\n```\r\n\r\nmaking the same thing without chaining works correctly\r\n```javascript\r\n    _.last(\r\n        _.takeWhile([1, 2, 3], function(item) {\r\n            return item < 3\r\n        })\r\n    )\r\n    // ==> 2\r\n```\r\n\r\nmaybe some issue with lazy evaluation?\r\n\r\nI created a jsfiddle from this issue with the latest lodash (3.3.0)\r\nhttp://jsfiddle.net/zyx2rkfa/"},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/75940089","html_url":"https://github.com/lodash/lodash/issues/990#issuecomment-75940089","issue_url":"https://api.github.com/repos/lodash/lodash/issues/990","id":75940089,"user":{"login":"niom","id":980731,"avatar_url":"https://avatars.githubusercontent.com/u/980731?v=3","gravatar_id":"","url":"https://api.github.com/users/niom","html_url":"https://github.com/niom","followers_url":"https://api.github.com/users/niom/followers","following_url":"https://api.github.com/users/niom/following{/other_user}","gists_url":"https://api.github.com/users/niom/gists{/gist_id}","starred_url":"https://api.github.com/users/niom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niom/subscriptions","organizations_url":"https://api.github.com/users/niom/orgs","repos_url":"https://api.github.com/users/niom/repos","events_url":"https://api.github.com/users/niom/events{/privacy}","received_events_url":"https://api.github.com/users/niom/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T10:46:43Z","updated_at":"2015-02-25T10:46:43Z","body":"Fix confirmed. Thanks."}}