fact: Fixpoint maxBy{T: Type}(f: T -> nat)(currentMax: nat)(currentBest: T)(l: list T): T := match l with | nil => currentBest | cons h t => if currentMax <? (f h) then maxBy f (f h) h t else maxBy f currentMax currentBest t end.
imports: Arith Lia List