From page 29 of The algebra of programming :
For any category C the opposite category Cop is defined to have the same objects and arrows as C, but the source and target operators are interchanged and composition is defined by swapping arguments:
f?g in Cop=g?f in C.
This doesn't makes sense. Suppose C is the categories of all functions, and we have f:A?B and g:B?C, then g?f doesn't even exist. Or, suppose f:A?B and g:B?A, then f?g:A?A, and g?f:B?B, this is not interchanging source and target, this is changing both!
The problem in your first example is that the arrows don't compose. In the first, you have f:A?B and g:C?B, so f?g is not in C, hence in Cop f:B?A and g:B?C, and they still don't compose.
If you had f:A?B and g:B?C, then they compose to f?g=h:A?C in C. In Cop you have f:B?A and g:C?B and get g?f=h:C?A (remember in Cop you want every thing running backwards) .
Your second example is fine, you just have f:A?B and g:B?A in C and hence f?g:A?A and g?f:B?B in C. In Cop, they switch: f:B?A, g:A?B are in Cop and so are g?f:A?A and f?g:B?B.
I wonder perhaps if the phrasing used by Bird is causing a problem. The rule is better stated:
If h=g?f in C , then h=f?g in Cop.
There's also a kind of name overloading going on here, from a programmer's perspective, reusing the same names for the opposite versions is a bit odd, it might make more sense to think along the lines (restating one of the rules):
If f:X?Y is in C, then fop:Y?X is in Cop
From page 29 of The algebra of programming : For any category C the opposite category...
Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between international trade and domestic trade More complex context More difficult and risky Higher management skills required 3. Basic concept s relating to international trade Visible trade & invisible trade Favorable trade & unfavorable trade General trade system & special trade system Volume of international trade & quantum of international trade Commodity composition of international trade Geographical composition of international trade Degree / ratio of...