Did you know ... Search Documentation:
Pack xlibrary -- prolog/top_k.pl
PublicShow source
 group_by_sorted(+Key, :Value, -Goal, -Bag)
Like group_by/4, but assumes that Goal produces solutions ordered by Key. This allows a linear, streaming implementation.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 top_k(Arg1, Arg2, Arg3)