Take a look at this one - Arduino Playground - SevenSegment Library.
Rather than having a separate pair of functions for each number, it has an array that stores the pattern for each number in a single byte and iterates through the bits to light the segments.