Lecture 1 - Page 24 : 49
Programming Paradigms
Introduction to Functional Programming in Scheme
* Lisp and Scheme
Lisp
Scheme
R5RS, R6RS, R7RS, ...
* Expressions and values
The read-eval-print loop - REPL
Practical Scheme Programming
* Types
Types
Typing and Typecheck
* Lists
Proper lists
Symbolic expressions and improper lists
Practical list construction
List functions
Association lists
Property lists
Programs represented as lists
* Other Data Types
Other simple types
Vectors
Strings
* Definitions
Definitions
* Functions
The function concept
Evaluation of parenthesized expressions in Scheme
Lambda Expressions in Scheme
Lambda calculus
Function objects
Functions as first class values
Closures
More forms of lambda expressions in Scheme
Function definition in Scheme
* Name binding constructs
The
let
name binding expression
The equivalent meaning of
let
The
let*
name binding construct
The
let*
name binding construct
An example with
let*
The
letrec
namebinding construct
An implementation of letrec
Binding of free names
Binding of free names - examples
The
fluid-let
namebinding construct
* Referential Transparency
Referential Transparency - Practical Aspects
Referential Transparency
More Excercises
Definitions
A
definition
binds a name to a value
(define name expression)
A name is first introduced and the name is bound to the value of the expression
About Scheme
define
forms
Appears normally at
top level
in a program
Creates a new location named
name
and binds the value of
expression
to that location
In case the location already exists we have a
redefinition
, and the
define
form is equivalent to an assignment
Does not allow for imperative programming, because
define
cannot appear in selections, iterations, etc.
Can also appear at certain positions in bodies, but only as syntactic sugar for local binding forms (
letrec
)
R5RS: Definitions