Functional Problem Solving (CSC 151 2015F) : EBoards

CSC151.01 2015F, Class 27: Characters and Strings


Overview

Preliminaries

Admin

Upcoming Work

Extra Credit Opportunities

Academic

Peer Support

Questions

Will you be upset if my lines of Scheme are more than 80 characters and therefore wrap into unreadable form?

Yes.

I'm still getting the annoying GDBus error. What should I do?

I've found that most of the instances have to do with image-get-pixel. I've been using the following strategy.

First, add the following to the definitions pane.

    (define image-get-pixel-verbose
      (lambda (image col row)
        (display (list 'image-get-pixel image col row))
        (newline)
        (image-get-pixel image col row)))

Next, change the calls to image-get-pixel to use image-get-pixel-verbose.

Finally, look at where you're trying to get pixels form.

My code for problem 3 has a lot of calls to make-list. Do you think that's a good idea?

Probably not. Think about the following pair of expressions. The second is more efficient (and probably clearer).

    (map list (make-list 10 0) (iota 10))

    (map (section list 0 <>) (iota 10))

Should we write at least the 4P's for our helper functions?

Yes. Particularly if you name them things like "ell" or "ipse" or "fun", "ellipse1", "ellipse2"

For 3b, can we assume that top and height are reasonable?

Yes. I probably should have made you write preconditions, but I said "Do not document".

Can I still document when you say "Do not document"?

Yes.

What should our tests and examples look like if it outputs an image?

    ; > (image-show (image-target! "red" "green" "blue" "purple" 25 17 83 11 200 800))
    ; 5
    ; ; Image 5 shows me ...

Lab