[racket] Basic inquiry
Dear Matthias,
Thank you for replying to me. I am sure this is laughably basic for you.
I got what you wrote. I know string-ith extracts the letter. My question
is how to use it. I have tried various ways of writing both in the def and
interaction sections but have not worked out. Even consulting the Helpdesk
has not helped as it does not tell me how to use the fucntion.
Sorry if I am being very thick. I really want to do it right.
Saad
On Fri, May 11, 2012 at 11:47 PM, Matthias Felleisen
<matthias at ccs.neu.edu>wrote:
>
> The beginning of section 2.1.3 looks like this:
>
>
> > All other operations concerning strings consume or produce data other
> than strings. Here are some examples:
> > • string-length consumes a string and produces a (natural) number;
> >
> > • string-ith consumes a string s and extracts the one-character
> substring located at the ith position (counting from 0); and
> >
> > • number->string consumes a number and produces a string.
> >
> > Also look up substring and find out what it does.
>
> Which function do you think extracts a "letter" from a string? [[You can
> follow the links for the function names. Perhaps it is easier to read the
> docs.]]
>
> -- Matthias
>
>
>
>
> On May 11, 2012, at 4:22 PM, saad bashir wrote:
>
> > I am back again. I had a basic inquiry and your help got me started.
> >
> > My problem is as follows:
> >
> > I have just started to work through 2Htdp (i.e. the second edition) that
> you had guided me to. Having gone through the prologue I am now on the
> second chapter, "Fixed-size data." But have got stuck almost at the start.
> I have successfully done the first two exercises but have hit a road block
> on exercise 3 (section 2.1.3 "Mixing it up"). I do not know what
> instruction to use to insert or extract a letter from the ith position. I
> think I am doing something wrong when trying to look up things in Helpdesk.
> Please help.
> >
> > Saad
> >
> > On Fri, Apr 27, 2012 at 8:32 PM, Danny Yoo <dyoo at cs.wpi.edu> wrote:
> > On Fri, Apr 27, 2012 at 11:27 AM, saad bashir <bashir.saad at gmail.com>
> wrote:
> > > Your help was great. Things are working now. And a great thank you
> for
> > > leading me to the 2d edition of How to Design Programs. I had not
> known
> > > about it.
> >
> >
> > Glad to hear that it's working for you now! Please feel free to
> > continue to ask questions on the mailing list; we'll be happy to help.
> >
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120512/3dd9e413/attachment-0001.html>