[racket] Why reference to an identifier before its definition in this program?

2011-12-25 Thread Eric Hanchrow
This is racket v5.2. #lang racket (define/contract (x input) (y . - . any/c) 3) ;; (define (x input) ;; (y) ;; 3) (define (y) #t) When I run this, I get racket ./hmm.rkt reference to an identifier before its definition: y in module: ... However, if I comment out the first

Re: [racket] Why reference to an identifier before its definition in this program?

2011-12-25 Thread Robby Findler
Yes, - acts basically like a function. With the current implementation, you need to delay things if you want that behavior, eg: (define/contract (x input) (- (lambda (x) (y x)) any) 3) Robby On Sun, Dec 25, 2011 at 4:52 PM, Eric Hanchrow eric.hanch...@gmail.com wrote: This is racket v5.2.