Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdearman committed Jun 9, 2024
1 parent e81ce28 commit d47e5bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/mvp.scm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@
(#t ,then)
(#f ,else)))

;; Reader macros are rules for transforming terms at read time.
;; They are used to define new syntax and to optimize code.
;; The most common reader macro is the quote reader macro.
;; Quote can be defined as a reader macro using the `reader` special form
;; and template matching.
(reader-macro (quote stream)
(match stream
("'{term}" `(quote term))))

;; module declarations
(module Vector
(def (new) {:data []})
Expand Down

0 comments on commit d47e5bd

Please sign in to comment.