mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-08-16 17:20:35 +03:00
Improve fake expansion of %-
found in %=
docs
The discussion of `%-` in the `%=` section is very valuable but the macro expansion given there has two deficiencies: 1) it is fake, and more importantly 2) someone relying on it could get bitten by the following: ```hoon =+ a=5 =+ add => %= +2 +6 [a 9] == $ ``` This twig produces 9, not 14, because the `a` there resolves to the head of the sample of `+add`, whereas the supposedly equivalent `(add a 9):[a=5 .]` does produce the expected result of 14.
This commit is contained in:
parent
12f02fd04f
commit
db5ab703de
@ -805,7 +805,7 @@ Here's that again in tall form:
|
||||
```hoon
|
||||
=+ foo
|
||||
=> %= +2
|
||||
+6 baz
|
||||
+6 baz:+3
|
||||
==
|
||||
$
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user