CS115 Study Guide - Final Guide: Boolean Function, Type System, Substring

235 views16 pages
elliehaj0807 and 36989 others unlocked
CS115 Full Course Notes
13
CS115 Full Course Notes
Verified Note
13 documents

Document Summary

Imperative: frequent changes to data ( c++, java, python) Functional: computation of new value, not transformations of old ones ( r,xslt, etc) A function application: supplies arguments for the parameters. Prefix notation: the operator comes before the operands ( ex + 2 3 ) Infix notation : the operator is between the operands ( ex 2 +3 ) You can change the name of the parameters, does not change anything about the function. F(x)= x2 is the same as f(cookies)= cookies2. Order of the arguments must be the same in the function. Ex: f( x, y)= x2+y2 must be in that order, cannot be f( y, x)= x2+y2. Define : a special form ( not all arguments are evaluated), binds a name to an expression. 4 cannot be further simplified, therefore value. 4+1 can be simplified to 5, so not value yet. Tracing: step by step simplification of a problem by applying substitution rules.