One thing to consider: "if" takes a boolean value as the first part. The function "string?" evaluates to a boolean value, so you can just use this result directly instead of seeing if it is equal to "true."
In other words, you could simplify the first part to (if (string? s) ...) In general, you should always use boolean values directly instead of comparing them to true or false. On Wed, Feb 29, 2012 at 11:47 AM, ROELOF WOBBEN <r.wob...@home.nl> wrote: > Oke, > > So no more points which can be better. > > Roelof > > > Op 29/02/12, *Joshua Ewulo * <jew...@gmail.com> schreef: > > Hello Roelof, > > It does what it says. > > Joshua > > > On 29 February 2012 18:14, ROELOF WOBBEN <r.wob...@home.nl < > r.wob...@home.nl>> wrote: > >> (define (string_first s) >> ( if (eq? (string? s) true) (string-ith s 0 )"You have not entered a >> string")) >> > > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users