Scala's type system is simultaneously its most impressive and infuriating feature - trying to wrestle it into submission is a rite of passage, but the payoff is worth it