PasteRack.org
Paste # 72623
2026-10-23 06:28:13

Fork as a new paste.

Paste viewed 89 times.


Embed:

  1. #lang racket
  2. (define lst
  3.   (cons 'apple 42))
  4.  
  5. lst
  6. (rest lst)
  7. (pair? lst)
  8. (list? lst)

=>

'(apple . 42)

rest: contract violation

  expected: (and/c list? (not/c empty?))

  given: '(apple . 42)

#t

#f