Received: from csa.bu.edu (csa [128.197.12.3]) by cs.bu.edu (8.12.2/8.12.2) with ESMTP id hA62jLLl009968; Wed, 5 Nov 2003 21:45:21 -0500 (EST) Received: from localhost (cselin@localhost) by csa.bu.edu (8.10.1/8.10.1) with ESMTP id hA62jJJ15190; Wed, 5 Nov 2003 21:45:19 -0500 (EST) X-Authentication-Warning: csa.bu.edu: cselin owned process doing -bs Date: Wed, 5 Nov 2003 21:45:19 -0500 (EST) From: Christopher Selin <cselin@cs.bu.edu> X-Sender: cselin@csa.bu.edu To: "Rui Shi@cs.bu.edu" <shearer@cs.bu.edu> cc: cs320@cs.bu.edu Subject: Re: Important issue about Problem6 in Assignment8!! In-Reply-To: <004a01c3a3ec$0cd28b40$ae0ac580@PLshearer> Message-ID: <Pine.SOL.4.20.0311052141400.13903-100000@csa.bu.edu> Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Length: 736 Status: RO X-Mozilla-Status: 8019 X-Mozilla-Status2: 00000000 X-UIDL: 3fa9987300000014
It is my understanding that lookup, looks for a key (which is a string) and
returns the item corresponding to that key, if it finds it. If we're
looking up a string, why would we need to use the nth function?
On Wed, 5 Nov 2003, Rui Shi@cs.bu.edu wrote:
> Hi, all,
>
> I realilze that in problem 6, the professor ask us to implement lookup etc. functions using binary search.
>
> You may need following functions:
>
> List.nth : 'a list * int -> 'a
>
> which take a list and an index n, return the nth element in the list. nth (ls, 0) is the first element of ls.
>
> Also need to note that we should use
>
> String.compare (a, b) to compare 2 strings, read the text book.
>
> Sorry for late reminder.
>
> TF
>
>
>
>
>
This archive was generated by hypermail 2b29 : Fri Jan 21 2005 - 12:17:03 EST