Functional Problem Solving (CSC 151 2014F) : EBoards
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] [VM] [Errors] - [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)]
Overview
rectangle procedure from the
lab on procedures.
See link on schedule or list of labs for link to submit it.What are the key concepts you learned in the reading/lab?
(define NAME (PARAMS) BODY).What were the more difficult aspects of the reading/lab?
What else would you like to know about (with regards to proc)?
;;; Procedure:
;;; max
;;; Parameters:
;;; x, a number
;;; y, a number
;;; Purpose:
;;; Find the greatest value in the set (x,y),
;;; Produces:
;;; greatest, a number
;;; Preconditions:
;;; Neither x nor y is imaginary.
;;; Postconditions:
;;; greatest >= x
;;; greatest >= y
;;; greatest is one of (x,y)
;;; Procedure:
;;; max
;;; Parameters:
;;; x1 ... xn, two or more real numbers
;;; Purpose:
;;; Find the greatest value in the set [x1 ... xn]
;;; Produces:
;;; greatest, a number
;;; Preconditions:
;;; [No additional]
;;; Postconditions:
;;; greatest >= xi, for any i.
;;; greatest is an element of [x1 ... xn]