chickadee » srfi-225 » dict-intern!

dict-intern! dto dict key failureprocedure

If there is a key in dict that is the same as key, returns two values, dict and the value associated with key. Otherwise, returns two values, a dictionary that contains all the associations of dict and in addition a new association that maps key to the result of invoking failure, and the result of invoking failure.

(dict-intern! dto dict 1 (lambda () #f))((1 . 2) (3 . 4) (5 . 6))
  2

(dict-intern! dto dict 2 (lambda () 0))((1 . 2) (2 . 0) (3 . 4) (5 . 6))
  0