PasteRack.org
Paste # 21556
2018-02-11 20:00:43

Fork as a new paste.

Paste viewed 37 times.


Embed:

  1. #lang racket
  2. (define mpr (mcons 10 (mcons 3 (mcons "yay" "test"))))
  3.  
  4. (set-mcar! mpr 30)
  5.  
  6. (set-mcdr! mpr (mcons 5 null))
  7.  
  8. (length mpr)

=>

length: contract violation

  expected: list?

  given: (mcons 30 (mcons 5 '()))