icfp-examples no longer errors

original commit: 86c6f3e9c06de95e950cc3a55b3235f44be78a8e
This commit is contained in:
Sam Tobin-Hochstadt 2010-04-21 11:41:26 -04:00
parent f06b81ba16
commit 4ee3734052

View File

@ -62,11 +62,13 @@
(d/c (abo xs idxs f)
((listof identifier?) (listof name-ref/c) Filter/c . -> . Filter/c)
(define (lookup y)
(for/first ([x xs] [i idxs] #:when (free-identifier=? x y)) i))
(d/c (lookup y)
(identifier? . -> . (or/c #f integer?))
(for/first ([x xs] [i idxs] #:when (free-identifier=? x y)) i))
(define-match-expander lookup:
(syntax-rules ()
[(_ i) (app lookup (? values i))]))
[(_ i) (or (? identifier? (app lookup (? values i)))
i)]))
(define (rec f) (abo xs idxs f))
(define (sb-t t) t)
(filter-case (#:Type sb-t #:Filter rec) f