Fundamentals of Computer Science I (CS151 2003F)
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Instructions]
[Links]
[Guidelines for Lab Writeups]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[Scheme Report]
[Glimmer Scheme Reference]
[CSC151.01 (Gum)]
[CSC151 2003S]
[CSC151 2002F]
[SamR]
Back to Local Bindings Laboratory. On to Detour: Intersection.
Held: Friday, 10 October 2003
Summary: Today we consider techniques for defining local procedures, procedures that are only available to select other procedures.
Related Pages:
Assignments
Notes:
Overview:
let and let*.
let nor let* works for recursive procedures.
letrec.
let.
letrecletrec expression has the format
(letrec ((name1 exp1)
(name2 exp2)
...
(namen expn))
body)
letrec is evaluated using the following series
of steps.
name1 through
namen into the binding table.
(Note that no corresponding values are entered.)
exp1 through
expn, giving you results
result1 through
resultn.
namei and
resulti for each
reasonable i.
let, except
that the order of entry into the binding table is changed.
letlet is somewhat stranger, but is handy for
some problems.
let has the format
(let name ((param1 exp1) (param2 exp2) ... (paramn expn)) body)
param1 ...
paramn
and body body.
name.
exp1 through
expn .
(letrec ((name (lambda (param1 ...
paramn
)
body)))
(name val1 ... valn))
Back to Local Bindings Laboratory. On to Detour: Intersection.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Instructions]
[Links]
[Guidelines for Lab Writeups]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[Scheme Report]
[Glimmer Scheme Reference]
[CSC151.01 (Gum)]
[CSC151 2003S]
[CSC151 2002F]
[SamR]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Tue Dec 9 13:59:46 2003.
The source to the document was last modified on Mon Sep 1 13:30:51 2003.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2003F/Outlines/outline.26.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby