Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.29 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. cons, list and mpair in racket
  2. (require scheme/mpair)
  3.  
  4. (list)                   ;; '()
  5. (mlist)                  ;; '()
  6.  
  7. (cons 'un (list))        ;; '(un)
  8. (list 'un (list))        ;; '(un ())
  9.  
  10. (mcons 'un (mlist))      ;; (mcons 'un '())
  11. (mlist 'un (mlist))      ;; (mcons 'un (mcons '() '()))