Hoogle was not very useful, but Hayoo is!
foldcmpl
so this is a special form of fold for a list, but it does not apply length list
times but one time less.
isSortedBy
is not entirely general in its name, but in its signature. Maybe insisting on the most general name is not that helpful. Otherwise we just have entities all over?
The definition reads:
The isSortedBy function returns True iff the predicate returns true for all adjacent pairs of elements in the list.
Maybe: all_adjacent_pairs(R_2, Xs)
. which sounds a bit after having a looping construct that has adjacent_pair
as some modifier.