Functional Problem Solving (CSC 151 2015F) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric] [Remote Access]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Curtsinger (2015F)] [Davis (2013F)] [Rebelsky (2015S)] [Weinman (2014F)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
Overview
What are the differences between functional and imperative?
Pure functional languages assume that when you call a function, it returns a new value and doesn't change anything. Imperative langauges are all about change.
Imperative languages often have a much more explicit order of evaluation
Scheme is both functional and imperative. (And object-oriented.) (And awesome.)
_For Part A on the homework, do you want a chunk of code or a procedure?
I'd prefer a procedure, but the specifications don't make it clear, so I'd accept a chunk of code.
Don't the line lengths vary already?
We'd like you to vary them more explicitly. Make it a percentage of the distance from starting point to ending point.
Problem 2 hint: Count UP!
NO WRITEUP TODAY! (But do the whole lab; you'll learn a lot, and maybe even have some fun.)
(define image-clear
(lambda (image)
(context-set-fgcolor! "white")
(image-select-nothing! image)
(image-fill! image)))