[plt-scheme] Type for Hash Tables

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Thu Mar 12 08:39:49 EDT 2009

On Thu, Mar 12, 2009 at 12:35 PM, Sam TH <samth at ccs.neu.edu> wrote:
> On Wed, Mar 11, 2009 at 10:51 AM, Paulo J. Matos <pocmatos at gmail.com> wrote:
>> Hi,
>>
>> There doesn't seem to be any type for hash tables, how can I type a
>> function that receives or returns an hash table?
>
> There is a type for hash tables, but it seems to be missing from the docs.
>
> It's used like this:
>
> (: lookup-foo ((HashTable Symbol Number) -> Number))
> (define (lookup-foo h) (hash-ref h 'foo))
>
> I'll fix the docs momentarily.

Great! Thanks!

> --
> sam th
> samth at ccs.neu.edu
>



-- 
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm


Posted on the users mailing list.