Numerous third-party camera apps already exist on the App Store which allow users to stitch together multiple photos into a panoramic image. 360 Panorama is the best example I can think of, and it does a really good job of creating panoramas from multiple images.
It seems Apple considered including photographic panorama functions in iOS 5 but hasn't made them available to end users -- at least not without tweaks. Developer Conrad Kramer found the code for panorama functions buried within iOS 5 and posted a series of screenshots on Twitter in addition to the finished panorama above.
According to Kramer, iOS developers can