algs4; exercise 1.1.13 - use more idiomatic function names