ReactiveCocoa/ReactiveCocoa — pull request #818 by kastiglione (2013-09-24 17:33:49+00:00)
Title: Give -initially: top-down composition

This might be a case against `-initially:`, but here's a fix for a problem I noticed.

The problem is that `-initially:` composes bottom-up, following subscription, but that can present unexpected results. Especially when compared to `-finally:` and other side-effect introducing operators.

```objc
[[[[[[RACSignal
empty]
initially:^{
NSLog(@"A");
}]
initially:^{
NSLog(@"B");
}]
finally:^{
NSLog(@"Y");
}]
finally:^{
NSLog(@"Z");
}]
subscribeCompleted:^{}];
```

Produces B A Y Z.

For some real code, I came across this problem when I wanted to do this:

```objc
[[self
rac_signalForSelector:@selector(prepareForSegue:sender:)]
initially:^{
[self performSegueWithIdentifier:@"SegueIdentifier" sender:self];
}];
```

In this case `-performSegueWithIdentifier:` gets called prior to `-rac_signalForSelector:`, and consequentially, the call to `-prepareForSegue:` is not observed.

I switched to `+createSignal:`, to control the order of side effects, but I'm thinking `-initially:` should either be changed, or removed.