Skip to content

Fix minor typos in symmetric-meta-programming.md #3695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/docs/reference/symmetric-meta-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Here’s the definition of the `mapImpl` macro, which takes quoted types and exp
var i = 0
val xs = ~arr
var len = xs.length
val ys = new Array[~u]
val ys = new Array[~u](len)
while (i < len) {
ys(i) = ~op(’(xs(i)))
i += 1
Expand Down Expand Up @@ -212,7 +212,7 @@ Here’s an application of `map` and how it rewrites to optimized code:
var i = 0
val xs = ~’($this)
var len = xs.length
val ys = new Array[~’[Int]]
val ys = new Array[~’[Int]](len)
while (i < len) {
ys(i) = ~(’(f)(’(xs(i))))
i += 1
Expand All @@ -229,7 +229,7 @@ Here’s an application of `map` and how it rewrites to optimized code:
var i = 0
val xs = $this
var len = xs.length
val ys = new Array[Int]
val ys = new Array[Int](len)
while (i < len) {
ys(i) = xs(i) + 1
i += 1
Expand All @@ -245,7 +245,7 @@ Here’s an application of `map` and how it rewrites to optimized code:
var i = 0
val xs = $this
var len = xs.length
val ys = new Array[Int]
val ys = new Array[Int](len)
while (i < len) {
ys(i) = xs(i) + 1
i += 1
Expand Down Expand Up @@ -291,7 +291,7 @@ applicable without the global value exception. But in the example as
given this does not hold since both `assert` and `program` call
`assertImpl` with a splice but no quote.

However, one can could argue that the example is really missing
However, one could argue that the example is really missing
an important aspect: The macro library has to be compiled in a phase
prior to the program using it, but in the code above, macro
and program are defined together. A more accurate view of
Expand Down