Unformatted text preview: even nonexpression sentences (first 274) functions don’t have to be arithmetic (butfirst 274) (abbreviation bf ) (first ’hello) works for nonnumbers (first hello) reminder about quoting (first (bf ’hello)) composition of nonnumeric functions (+ (first 23) (last 45)) combining numeric and nonnumeric (define pi 3.14159) special form pi value of a symbol ’pi contrast with quoted symbol (+ pi 7) symbols work in larger expressions (* pi pi) (define (square x) (* x x)) de±ning a function (square 5) invoking the function (square (+ 2 3)) composition with de±ned functions Terminology: the formal parameter is the name of the argument ( x ); the actual argument expression is the expression used in the invocation ( (+ 2 3) ); the actual argument value is the value of the argument in the invocation (5). The argument’s name comes from the function’s de±nition; the argument’s value comes from the invocation. 267...
View
Full Document
 Spring '10
 Harvey,B
 Functional Programming, Abelson, Pi Pi, actual argument expression, best CS book, actual argument value

Click to edit the document details