Functional Problem Solving (CSC 151 2014F) : Reference
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2014S)] [Weinman (2014F)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
(if
test
consequent
alternative
)
test
. If its value is truish (that is,
anything but false), evaluate consequent
and return its value. If the value of test is false (#f), evaluate
and return alternative
.
(when
test
exp1
exp2
...
expn
)
test
. If it holds, evaluate
each expression in turn. Otherwise, do nothing.
(cond
(test1
consequents1
)
(test2
consequents2
)
...
(testn
consequentsn
)
(else
alternative
))
(and
exp1
exp2
...
expn
)
(or
exp1
exp2
...
expn
)