Functional Problem Solving (CSC 151 2015F) : EBoards

CSC151.01 2015F, Class 15: Drawings as Values


Overview

Preliminaries

Admin

Upcoming Work

Extra Credit Opportunities

Academic

Peer Support

Non Extra-Credit Activities

Questions

When I run my procedure, instead of seeing a result, I see something like <procedure:hop.sadasfasffsdad#1231321>

(define my-proc
  (lambda (a b c)
    (o (section max a <>) (section max b <>) (section max c <>))))
> (my-proc 1 2 3)
#<procedure:...gigls/higher.rkt:215:4>

This means that you've written a procedure that returns a procedure. Congratulations! Many (non-Grinnell) CS majors don't learn how to do this until their senior year. But that's probably not what you wanted. Send me your code and I'll help you figure it out.

How many tests should we have in problem 4?

Enough that you are confident that a procedure written by any well-intentioned but incompetent programmer that passes your tests will always be correct. Probably about eight or so different cases in which you look at the minutes and seconds of each.
* EG says: Don't only write similar tests like "1 min 3 sec plus 2 min 3 sec" "2 min 3 sec plus 3 min 4 sec".)

Should we try times that go over an hour?

Yes, that would be good. But they will give large numbers of minutes; you should not worry about dealing with hours.

I got `Contract violation! Expect a lawyer to appear soon. Expected number?. Got procedure!

(+ + -) will give you that error, as will any attempt to use a procedure when Scheme expects a number.

Do you need a picture for the last problem?

No. The kitten has suffered enough.

Representing images

Thinking about drawings through composition/decomposition

The underlying representation

Pure approaches vs impure approaches