A.15 library(dicts): Dict utilities
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(dicts): Dict utilities
          • dicts_same_tag/2
          • dict_size/2
          • dict_keys/2
          • dicts_same_keys/2
          • dicts_to_same_keys/3
          • dict_fill/4
          • dicts_join/3
          • dicts_join/4
          • dicts_slice/3
          • dicts_to_compounds/4
    • Packages
Availability::- use_module(library(dicts)).(can be autoloaded)
Source[semidet]dicts_join(+Key, +DictsIn, -Dicts)
Join dicts in Dicts that have the same value for Key, provided they do not have conflicting values on other keys. For example:
?- dicts_join(x, [r{x:1, y:2}, r{x:1, z:3}, r{x:2,y:4}], L).
L = [r{x:1, y:2, z:3}, r{x:2, y:4}].
Errors
existence_error(key, Key, Dict) if a dict in Dicts1 or Dicts2 does not contain Key.