[racket] code review request for LRU code

From: Danny Yoo (dyoo at hashcollision.org)
Date: Tue Mar 12 16:00:21 EDT 2013

Hi everyone,

I coded up a quick-and-dirty implementation of an LRU cache with Typed
Racket to make sure I understood the concept.  I was wondering if
anyone can take a look and see if it looks ok?

     https://github.com/dyoo/typed-lru

The implemetation is in 'lru.rkt', and test cases are in 'test-lru.rkt'.


One thing I'm noticing is that it seems difficult to use my typed code
in untyped code, because the container is polymorphic.
'untyped-client.rkt' shows what I mean: I'm hitting a Type Checker
error at runtime and I don't know what to do to avoid it yet.  What
can I do here?

Posted on the users mailing list.