{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2323","repository_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa","labels_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2323/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2323/comments","events_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2323/events","html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/issues/2323","id":105344360,"number":2323,"title":"Why RACCommand uses concat&publish?","user":{"login":"daixunry","id":5915629,"avatar_url":"https://avatars.githubusercontent.com/u/5915629?v=3","gravatar_id":"","url":"https://api.github.com/users/daixunry","html_url":"https://github.com/daixunry","followers_url":"https://api.github.com/users/daixunry/followers","following_url":"https://api.github.com/users/daixunry/following{/other_user}","gists_url":"https://api.github.com/users/daixunry/gists{/gist_id}","starred_url":"https://api.github.com/users/daixunry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daixunry/subscriptions","organizations_url":"https://api.github.com/users/daixunry/orgs","repos_url":"https://api.github.com/users/daixunry/repos","events_url":"https://api.github.com/users/daixunry/events{/privacy}","received_events_url":"https://api.github.com/users/daixunry/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T10:00:53Z","updated_at":"2016-04-23T02:39:04Z","closed_at":"2016-04-23T02:39:04Z","body":"- (id)initWithEnabled:(RACSignal *)enabledSignal signalBlock:(RACSignal * (^)(id input))signalBlock  function in the RACCommand.m\r\n<pre> RACSignal *newActiveExecutionSignals = [[[[[self\r\n\t\trac_valuesAndChangesForKeyPath:@keypath(self.activeExecutionSignals) options:NSKeyValueObservingOptionNew observer:nil]\r\n\t\treduceEach:^(id _, NSDictionary *change) {\r\n\t\t\tNSArray *signals = change[NSKeyValueChangeNewKey];\r\n\t\t\tif (signals == nil) return [RACSignal empty];\r\n\r\n\t\t\treturn [signals.rac_sequence signalWithScheduler:RACScheduler.immediateScheduler];\r\n\t\t}]\r\n\t\tconcat]\r\n\t\tpublish]\r\n\t\tautoconnect];  </pre>\r\n I think the concat operation can be delete and reduceEach operation can return signals[0]  . And I can not find the mean of publish,I think publish is also no need.\r\n"},"comment":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/comments/213653546","html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/issues/2323#issuecomment-213653546","issue_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/2323","id":213653546,"user":{"login":"RuiAAPeres","id":949286,"avatar_url":"https://avatars.githubusercontent.com/u/949286?v=3","gravatar_id":"","url":"https://api.github.com/users/RuiAAPeres","html_url":"https://github.com/RuiAAPeres","followers_url":"https://api.github.com/users/RuiAAPeres/followers","following_url":"https://api.github.com/users/RuiAAPeres/following{/other_user}","gists_url":"https://api.github.com/users/RuiAAPeres/gists{/gist_id}","starred_url":"https://api.github.com/users/RuiAAPeres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuiAAPeres/subscriptions","organizations_url":"https://api.github.com/users/RuiAAPeres/orgs","repos_url":"https://api.github.com/users/RuiAAPeres/repos","events_url":"https://api.github.com/users/RuiAAPeres/events{/privacy}","received_events_url":"https://api.github.com/users/RuiAAPeres/received_events","type":"User","site_admin":false},"created_at":"2016-04-23T02:39:04Z","updated_at":"2016-04-23T02:39:04Z","body":"Closing due to inactivity."}}