[racket] Unexpected procedure identity

From: Markku Rontu (markku.rontu at iki.fi)
Date: Wed Sep 15 16:10:48 EDT 2010

Hi everybody,

I don't understand what the difference is with define and define/contract in
the following cases. Can somebody explain what happens here? Especially why
does unfun not eq? itself?!?

#lang racket

(define (fun) 'fun)
(define/contract (unfun) (-> symbol?) 'unfun)
(define fun? (contract (-> symbol?) fun 'fun '!fun))

> (eq? fun fun)
> (eq? unfun unfun)
> (eq? fun? fun?)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100915/6acc8bf5/attachment.html>

Posted on the users mailing list.