user1472346
user1472346

Reputation: 157

Import hash functions into Lazy Racket

How can I import hash functions into lazy Racket?

So far I have the following:

#lang lazy
(require (only-in racket/base
              hash
              hash-set))

and I get the following error:

only-in: bad module path in: (only-in racket/base hash hash-set)

Where am I going wrong? What would be the correct module path?

Upvotes: 1

Views: 209

Answers (2)

Eli Barzilay
Eli Barzilay

Reputation: 29546

To explain, the implementation of Lazy Racket was an old one, based on the "MzScheme" which is now a compatibility language. In v5.3 it was modernized and is more in line with the usual racket language.

Upvotes: 1

dyoo
dyoo

Reputation: 12013

Do you know what version of Racket you're using? I can't reproduce your error under Racket 5.3: when I try it, your code does what you expect.

Upvotes: 1

Related Questions