18 12 2020

scheme notes

1 keywords

car: Contents of the Address part of the Register non-destructive

cdr: Contents of the Decrement part of the Register non-destructive

assq: procedure: assq object alist Returns #t if object is an association list (including the empty list); otherwise returns #f

(define e '((a 1) (b 2) (c 3)))
(assq 'a e)                             ⇒  (a 1)
(assq 'b e)                             ⇒  (b 2)
(assq 'd e)                             ⇒  #f

2 others

Tags: scheme