CSC104H1 Lecture 5: LEC 5

23 views2 pages
19 Sep 2018
School
Course

Document Summary

If no parentheses around the name of the function > not a function i. e. (define f1 (above (rotate 45 b) a)) > output would be just a constant i. e. (define ) Begin with (define (g a b c)) (g a b c) > header g > the function name a b c > parameter names i. e. (define (g a b c) (above (rotate 45 b a))) When there is "step" function occurring, notice that we should deal with it step by step from left to right and inside out. If we use "step parallel", this means that we can now do with the most inner parts together as long as they are parallel i. e. (step parallel (above corny (beside corny corny) (beside corny corny corny)) Function of "add up 1 to n" takes a number to a number (define (add up 1 to n n) (/ (* n (+ n 1))

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents