The method takes an implicit Ordering which should be able to handle some supertype of A (hence B >: A). I.e. you should be able to use an Ordering[AnyVal] to compare Int values (as AnyVal is a supertype of Int).

Repr is a type parameter of the SeqLike trait itself (SeqLike[+A, +Repr]) described as "the type of the actual collection containing the elements". This is meant to ensure that methods like sorted will return a collection of the same type (e.g. List.sorted will still be a List).