[racket] two question about DrRacket

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Wed Jun 1 19:08:12 EDT 2011

> (define (p x)
>   (+ x 10)
>   (* x 10)
>   )
>
> The result of (p 4) is 40.  How can I display 14 and 40?

Write two separate functions.


> 2  How can I compare two letters in Ascii order?  For example, when input
> are "x" and "y", the program will tell x is before y.

http://docs.racket-lang.org/search/index.html?q=char%3C%3D%3F

Note that "x" and "y" are strings, not characters.  So you may want to
use string<=? instead.

Shriram



Posted on the users mailing list.