CSC324H5- Midterm Exam Guide - Comprehensive Notes for the exam ( 18 pages long!)

58 views18 pages
5 Oct 2017
School
Course
Professor

Document Summary

Lecture 1 introduction functions don t only return values they perform some tasks (side effects) Lisp: computations can be defined by symbols (words) #lang racket: is the version we are using. Basic data types boolean and numbers are already defined. The bare minimum we need to do for programming is: All the true and false, numbers, fractions are symbolic expressions. A function call is done as so: (sqrt -1) ; we cannot write sqrt(-1) ; when racket sees (a1 a2 ) as is interprereted as a function. ; a2 abd so on as aruguments (+ 1 2 3 4) ; here + is a function that acts on 1 2 3 4. To define a function we start by writing an expression (x y) -> (x^2 + y^2) Functions can be written using lambda expressions (lambda(x y) (sqrt (+ (sqr x)(sqr y)))) the above is an anonymous function. In math class we have f(x,y) = (x^2 + y^2)

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

Related Documents