PasteRack.org
Paste # 95748
2019-11-12 18:12:09

Fork as a new paste.

Paste viewed 478 times.


Embed:

  1. #lang racket
  2.  
  3. (dict-set (list 1 2 3) 'foo 'bar)

=>

dict-set: contract violation

  expected: (dict-implements/c dict-set)

  given: '(1 2 3)

  in: the d argument of

      (->i

       ((d (dict-implements/c dict-set))

        (k (d) (dict-key-contract d))

        (value (d) (dict-value-contract d)))

       (_r dict?))

  contract from: <collects>/racket/dict.rkt

  blaming: m

   (assuming the contract is correct)

  at: <collects>/racket/dict.rkt:190.2