{"action":"opened","issue":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/1996","labels_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/1996/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/1996/comments","events_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveCocoa/issues/1996/events","html_url":"https://github.com/ReactiveCocoa/ReactiveCocoa/issues/1996","id":75356425,"number":1996,"title":"Perform side effect before assigning variable","user":{"login":"vikfroberg","id":609536,"avatar_url":"https://avatars.githubusercontent.com/u/609536?v=3","gravatar_id":"","url":"https://api.github.com/users/vikfroberg","html_url":"https://github.com/vikfroberg","followers_url":"https://api.github.com/users/vikfroberg/followers","following_url":"https://api.github.com/users/vikfroberg/following{/other_user}","gists_url":"https://api.github.com/users/vikfroberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vikfroberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikfroberg/subscriptions","organizations_url":"https://api.github.com/users/vikfroberg/orgs","repos_url":"https://api.github.com/users/vikfroberg/repos","events_url":"https://api.github.com/users/vikfroberg/events{/privacy}","received_events_url":"https://api.github.com/users/vikfroberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-11T21:03:27Z","updated_at":"2015-05-11T21:03:27Z","closed_at":null,"body":"I want to perform some side effects before mapping values via the RAC macro, but I'm not sure how to. \r\n\r\nI've tried `doNext:` but it doesn't get called, I'm assuming that's because there's no `subscribeNext:` and because of the new signal that's created after the filtering.\r\n\r\n```obj-c\r\n// Move redundant hours to minutes \r\n[[self.hourField.textSignal\r\n    filter:^BOOL(NSString *text) {\r\n        return text.length > 2;\r\n    }]\r\n    doNext:^(NSString *text) {\r\n        self.minutesField.text = [text substringFromIndex:2];\r\n        [self.minutesField becomeFirstResponder];\r\n    }];\r\n\r\n// Trim everything but numbers\r\n// No longer than 2 numbers\r\nRAC(self.hourField, text) = [self.hourField.textSignal\r\n    map:^NSString *(NSString *text) {\r\n        return [[text\r\n            stringByReplacingOccurrencesOfRegex:@\"[^0-9]\" withString:@\"\"]\r\n            substringToIndex:MIN(2, text.length)];\r\n    }];\r\n```"}}