fixing typing of find-variable

This commit is contained in:
Danny Yoo 2011-03-11 14:02:06 -05:00
parent 05d6043613
commit b1ca4078b5

View File

@ -49,15 +49,15 @@
(: list-index (All (A) A (Listof A) -> (U #f Natural))) (: list-index (All (A) A (Listof A) -> (U #f Natural)))
(define (list-index x l) (define (list-index x l)
(let loop ([i 0] (let: loop : (U #f Natural) ([i : Natural 0]
[l l]) [l : (Listof A) l])
(cond (cond
[(empty? l) [(empty? l)
#f] #f]
[(eq? x (first l)) [(eq? x (first l))
i] i]
[else [else
(loop (add1 i) (rest l))]))) (loop (add1 i) (rest l))])))
(: extend-lexical-environment (: extend-lexical-environment