Did you know ... Search Documentation:
SWI-Prolog owl logo Predicate dict_keys/2
Tags are associated to your profile if you are logged in
Tags:
LogicalCaptain said (2021年01月22日T12:07:35):0 upvotes 0 0 downvotes
Picture of user LogicalCaptain.

Note that

This predicate behaves like findall/3 (it "relates to" the empty dict), not like bagof/3 (which fails if there are no solutions):

?- dict_keys(_{},Keys).
Keys = [].

instead:

?- Dict=_{}, bagof(Key-Value,get_dict(Key,Dict,Value),Bag).
false.

Missed opportunity

Add the possibility to pass a predicate to filter acceptable keys

login to add a new annotation post.

AltStyle によって変換されたページ (->オリジナル) /