@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://example.org/#>.

# 6) Both ends open: expect B>C, D>B, A>B, D>C, A>C
{
    ({ ?X :moreInterestingThan ?Y } { ?X :moreInterestingThan ?Y } ?L) log:collectAllIn ?SCOPE.
    ?L list:sort ?S.
    ?S list:member ?M.
} => ?M.

