Store the value to compute repeatedly

Also, avoid using `else if` block since early return is used; the block
is not necessary. 

It looks like the coding style in Go prefers "early return" over using if-else-if-else blocks if "return" can be used.
Nice examples can be found in the standard library, say, utf8 package http://golang.org/src/pkg/unicode/utf8/utf8.go (e.g., decodeRuneInStringInternal uses early return a lot)