diff --git a/functions.rkt b/functions.rkt index 31c1dc4..9a95d93 100644 --- a/functions.rkt +++ b/functions.rkt @@ -11,6 +11,7 @@ (module typed typed/racket (require "utils.rkt" + syntax/parse/define (only-in typed/racket/unsafe unsafe-provide) (for-syntax syntax/parse)) @@ -76,13 +77,11 @@ (check-false (g #t #f)) (check-exn exn:fail? (λ () (g #t #f #f)))) - (define-syntax (make-tabulate* stx) - (syntax-parse stx - [(_ name:id row-op) - #'(define (name funcs doms) - (for/list ([xs (in-list (apply cartesian-product doms))]) - (row-op xs (for/list ([f funcs]) : (Listof b) - (apply f xs)))))])) + (define-syntax-parse-rule (make-tabulate* name:id row-op) + (define (name funcs doms) + (for/list ([xs (in-list (apply cartesian-product doms))]) + (row-op xs (for/list ([f funcs]) : (Listof b) + (apply f xs)))))) (: tabulate* (All (b a ... ) (-> (Listof (-> a ... b)) (List (Listof a) ... a) (Listof (Listof (U Any b))))))