return type not getting inferred correctly. what am i doing wrong here? - Theo's Typesafe Cult