Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scheme/DrRacket

Name: Anonymous 2013-02-12 17:57

How do you do this shit /prog/?

Write a Scheme function update-info that consumes an info structure (called data, in which all field
values are numbers), and a nonnegative number (called upper-bound). The function produces the number of
fields in data which are negative or are strictly greater than upper-bound. In addition, all fields of data
which are negative are replaced with 0, and all fields of data that are greater than upper-bound are replaced
with upper-bound.  Use field mutation operations to update data – you may not create any new info
structures in update-info. For example,


(define d (make-info 11 9 -7))
(update-info d 10)
2
d
(make-info 10 9 0)

Name: Anonymous 2013-02-12 18:22

How do you manage not to fail the subject, >>1? This is probably the sixth time you ask.

Name: Anonymous 2013-02-12 18:24

>>7
Don't care about Scheme. This will be the last time I ask since we're finally getting into Python.

Name: Anonymous 2013-02-12 18:26

>>8
You are a spoilt idiot.

Name: Anonymous 2013-02-12 18:27

>>9
What?

Name: Anonymous 2013-02-12 18:27

>>10
You are a spoilt idiot.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List