Ord
Ord

Reputation: 5843

Racket "match" construct - is it a macro?

Simple question - is the match form in Racket a macro? It certainly seems like it could be defined as a macro, but I thought it might be baked further into the implementation to make it faster or something...

Upvotes: 3

Views: 551

Answers (2)

Asumu Takikawa
Asumu Takikawa

Reputation: 8523

Yes. See this paper if you're curious about how it's implemented. In general, all of the syntactic forms that are not listed on this page in the docs are built as macros.

Upvotes: 8

Daniel
Daniel

Reputation: 6775

match is not a macro. It is a regular Racket function.

EDIT: I was totally wrong. Match is a macro. Here's the documentation. http://docs.racket-lang.org/reference/match.html

Upvotes: 0

Related Questions