[Fluxus] Limiting scale changes

Matt Jadud jadudm at gmail.com
Sun Mar 30 09:21:56 PDT 2008


On Sun, Mar 30, 2008 at 11:54 AM, Claude Heiland-Allen
<claudiusmaximus at goto10.org> wrote:
>  I guess (min x y) is what you want - find the minimum of two numbers,
>  which if one is fixed will do "upper bound" clipping that you want:
>
>  (min (gh 14) 20)
>
>  Not tested, I'm not currently near a machine with fluxus and my Scheme
>  is rusty...

If you have to write 'min', you can.

(define (min a b)
  (if (< a b) a b))

"Define the function 'min' as a function of two variables, a and b. If
a is less than b, return the value of a. Otherwise, return the value
of b."

If you want to come to a better understanding of how to manipulate
data in Scheme, I highly recommend working through HtDP
(http://www.htdp.org/). The lessons you learn through working through
that material will serve you very well with Fluxus; the first nine
chapters (they're short) introduce you to different kinds of data, and
how to write functions that manipulate that data. That, and the PLT
Scheme mailing list is a good place to ask for help if you get stuck
working through said material.

Cheers,
Matt



More information about the Fluxus mailing list