fixing typing of find-variable
This commit is contained in:
parent
05d6043613
commit
b1ca4078b5
|
@ -49,15 +49,15 @@
|
|||
|
||||
(: list-index (All (A) A (Listof A) -> (U #f Natural)))
|
||||
(define (list-index x l)
|
||||
(let loop ([i 0]
|
||||
[l l])
|
||||
(cond
|
||||
[(empty? l)
|
||||
#f]
|
||||
[(eq? x (first l))
|
||||
i]
|
||||
[else
|
||||
(loop (add1 i) (rest l))])))
|
||||
(let: loop : (U #f Natural) ([i : Natural 0]
|
||||
[l : (Listof A) l])
|
||||
(cond
|
||||
[(empty? l)
|
||||
#f]
|
||||
[(eq? x (first l))
|
||||
i]
|
||||
[else
|
||||
(loop (add1 i) (rest l))])))
|
||||
|
||||
|
||||
(: extend-lexical-environment
|
||||
|
|
Loading…
Reference in New Issue
Block a user