chickadee » srfi-225 » make-dto

make-dto arg ...procedure

Returns a new DTO providing procedures that allow manipulation of dictionaries of a new type. The args are alternately proc-ids and corresponding procs.

A proc-id argument is the value of a variable whose name is the same as a procedure suffixed with -id, and a proc argument is the specific procedure implementing it for this type.

The following proc-id variables and associated procedures need to be provided in each call to make-dto in order for the DTO to support the full set of dictionary procedures:

  • dictionary?-id
  • dict-find-update!-id
  • dict-comparator-id
  • dict-map-id
  • dict-pure?-id
  • dict-remove-id
  • dict-size-id

Note that if any of these are not provided, an implementation-defined set of generic procedures will signal an error satisfying dictionary-error? if invoked.

There are additional proc-id variables that may be provided with corresponding procedures in order to increase efficiency. For example, it is not necessary to provide a dict-ref procedure, because the default version is built on top of dict-find-update!. But if the underlying dictionary provides its own -ref procedure, it may be more efficient to specify it to make-dto using dict-ref-id.

Here is the list of additional proc-id variables:

  • dict->alist-id
  • dict-adjoin!-accumulator-id
  • dict-adjoin!-id
  • dict-any-id
  • dict-contains?-id
  • dict-count-id
  • dict-delete-all!-id
  • dict-delete!-id
  • dict-empty?-id
  • dict-entries-id
  • dict-every-id
  • dict-filter-id
  • dict-fold-id
  • dict-for-each-id
  • dict-intern!-id
  • dict-keys-id
  • dict-map->list-id
  • dict-map-id
  • dict-pop!-id
  • dict-ref-id
  • dict-ref/default-id
  • dict-remove-id
  • dict-replace!-id
  • dict-set!-accumulator-id
  • dict-set!-id
  • dict-update!-id
  • dict-update/default!-id
  • dict-values-id
  • dict=?-id
  • dict->generator-id