PasteRack.org
Paste # 47202
2022-05-06 16:17:27

Fork as a new paste.

Paste viewed 378 times.


Embed:

  1. #lang racket
  2.  
  3. (define L '(1 2 3 4 5 6))
  4.  
  5. (car L)
  6. (cdr L)
  7. (cdr (cdr L))
  8. (car (car L))

=>

1

'(2 3 4 5 6)

'(3 4 5 6)

car: contract violation

  expected: pair?

  given: 1