Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeapostrophe committed May 31, 2012
1 parent 44a89cf commit 1fc781a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions opt-arrow.rkt
Expand Up @@ -13,15 +13,14 @@
(foo 1 2 3)
(foo 1 2 3 4)

(begin-for-syntax
(define opt->
(cons 't-macro
(λ (stx)
(printf "inside opt->\n")
(syntax-case stx (? ->)
[(_ [req-arg ... (? opt-arg ...) -> ret])
(syntax/loc stx
[req-arg ... opt-arg ... -> ret])])))))
(define-syntax opt->
(cons 't-macro
(λ (stx)
(printf "inside opt->\n")
(syntax-case stx (? ->)
[(_ [req-arg ... (? opt-arg ...) -> ret])
(syntax/loc stx
[req-arg ... opt-arg ... -> ret])]))))

(: foo2
(opt-> [Integer Integer (? Integer Integer) -> Integer]))
Expand Down

0 comments on commit 1fc781a

Please sign in to comment.