[racket] Check for #<undefined>
On Tue, May 31, 2011 at 6:29 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
> I have a structure with a guard function. It works well.
>
> However, I want to use it in a (shared ...) construct, and when the
> guard runs, a value is #<undefined>. I'm fine with letting the guard
> accept #<undefined> as a legal value, but I can't figure out any way
> to test for it.
>
> Is there such a beast, or is #<undefined> untouchable?
#lang racket
(define (undefined? v) (eq? (letrec ([x x]) x) v))
(undefined? (letrec ([y y]) y))
--
sam th
samth at ccs.neu.edu