From 7888fa5dc66fef9d8fe20063d6f7d71415130ec1 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Thu, 30 Jul 2009 19:30:05 +0000 Subject: [PATCH] Add some hash functions svn: r15642 --- collects/typed-scheme/private/base-env.ss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/collects/typed-scheme/private/base-env.ss b/collects/typed-scheme/private/base-env.ss index 06a844e445..1598c709f9 100644 --- a/collects/typed-scheme/private/base-env.ss +++ b/collects/typed-scheme/private/base-env.ss @@ -488,6 +488,17 @@ (cl-> [((-HT a b) a) b] [((-HT a b) a (-> c)) (Un b c)] [((-HT a b) a c) (Un b c)]))] +[hash-ref! (-poly (a b c) + (cl-> [((-HT a b) a (-> b)) b] + [((-HT a b) a b) b]))] +[hash-iterate-first (-poly (a b) + ((-HT a b) . -> . (Un (-val #f) -Integer)))] +[hash-iterate-next (-poly (a b) + ((-HT a b) -Integer . -> . (Un (-val #f) -Integer)))] +[hash-iterate-key (-poly (a b) + ((-HT a b) -Integer . -> . a))] +[hash-iterate-value (-poly (a b) + ((-HT a b) -Integer . -> . b))] #;[hash-table-index (-poly (a b) ((-HT a b) a b . -> . -Void))] [bytes (->* (list) N -Bytes)]