File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
docs/docs/reference/metaprogramming Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ title: "Macros"
66### Macros: Quotes and Splices
77
88Macros are built on two well-known fundamental operations: quotation and
9- splicing. Quotation is expressed as ` '{...} ` for expressions (both forms are
10- equivalent) and as ` '[...] ` for types. Splicing is expressed as ` ${ ... } ` .
11- Additionally, within a quote or a splice we can quote or splice identifiers
12- directly (i.e. ` 'e ` and ` $e ` ). Readers may notice the resemblance of the two
13- aforementioned syntactic schemes with the familiar string interpolation syntax.
9+ splicing. Quotation is expressed as ` '{...} ` for expressions and as ` '[...] `
10+ for types. Splicing is expressed as ` ${ ... } ` . Additionally, within a quote
11+ or a splice we can quote or splice identifiers directly (i.e. ` 'e ` and ` $e ` ).
12+ Readers may notice the resemblance of the two aforementioned syntactic
13+ schemes with the familiar string interpolation syntax.
1414
1515``` scala
1616println(s " Hello, $name, here is the result of 1 + 1 = ${1 + 1 }" )
You can’t perform that action at this time.
0 commit comments