CSC 4101 : 4101MidtermStudyGuide

29 views2 pages
15 Mar 2019
School
Course
Professor

Document Summary

Car" returns the first element in a list. Cdr" returns a sublist containing all elements in a list except the first. Cadr" returns the second item in a list, caddr" returns the third item in a list, and so on. Cons" takes two arguments and returns a list constructed from them. And quote are the same: (car(quote(1))) = (car (1)) * means 0 or more occurences of : show the result of evaluating each of the following scheme expressions: ((a) (b) (c)) returns (list (list a) (list b) (list c)) (car (list (list a) (list b) (list c))) returns (list a) And (car (list a)) returns a. (car (car "((a) (b) (c)))) ((a) (b) (c)) returns (list (list a) (list b) (list c)) (cdr (list (list a) (list b) (list c))) returns (list (list b) (list c)) And (cdr (list (list b) (list c))) returns (list (list c)). (cons (cons "(a) "(b)) "(c))

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents

Related Questions