This preview shows page 1. Sign up to view the full content.
Unformatted text preview: even non-expression sentences (first 274) functions dont have to be arithmetic (butfirst 274) (abbreviation bf ) (first hello) works for non-numbers (first hello) reminder about quoting (first (bf hello)) composition of non-numeric functions (+ (first 23) (last 45)) combining numeric and non-numeric (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)) dening a function (square 5) invoking the function (square (+ 2 3)) composition with dened 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 arguments name comes from the functions denition; the arguments value comes from the invocation. 267...
View Full Document
This note was uploaded on 02/17/2010 for the course COMPUTER S 26275 taught by Professor Harvey,b during the Spring '10 term at University of California, Berkeley.
- Spring '10
- Functional Programming