finally figuring out how to use inject with a conditional

you have to return the value at the end of the loop otherwise the next
iteration receives a nil object. we can't have that

turns out the one-liner is a little slower though :(