convert between scala and guava functions.