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)
Sourcedicts_to_same_keys(+DictsIn, :OnEmpty, -DictsOut)
DictsOut is a copy of DictsIn, where each dict contains all keys appearing in all dicts of DictsIn. Values for keys that are added to a dict are produced by calling OnEmpty as below. The predicate dict_fill/4 provides an implementation that fills all new cells with a predefined value.
call(:OnEmpty, +Key, +Dict, -Value)