CSC104H1 Lecture Notes - Lecture 3: Ellipse

19 views3 pages
26 Sep 2016
School
Course

Document Summary

; combining list elements with the function apply". ; when you want to use a function, but have a list of the arguments instead of an expression. ; errors when giving a list to a function that expects other types of data. ; +: expects a number, given (list 2 0 1 6) ; using the function apply" to give a function its arguments from a list of all the arguments. ; the contract is similar to the contract for map", but apply" doesn"t necessarily produce a list. ; the function apply" takes a function and the arguments for it in a list, and uses the given function. ; with all the arguments all at once: (check-expect (apply + (list 2 0 1 6)) (+ 2 0 1 6)) (check-expect (apply + (list 2 0 1 6)) Make sure you write out the intermediate step!

Get access

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

Related Documents

Related Questions