CSC104H1 Lecture 5: LEC 5
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))