Domanda di colloquio di Stripe

Implement `minByKey` given a key and list of `Map[String, Int]`; then implement `firstByKey` that generalizes this method and accepts a "direction" parameter. Lastly, implement a comparator and use it to re-implement `firstByKey`.