~technomancy/fennel

fennel: Update Macro Modules docs to unquote identifiers v1 PROPOSED

Jason Shipman: 1
 Update Macro Modules docs to unquote identifiers

 1 files changed, 6 insertions(+), 6 deletions(-)
#1204734 .build.yml failed
The build seems to have failed due to the patch containig the removal of
a few trailing spaces in the docs. It applies successfully locally via:

$ git am --whitespace=fix ~/path/to/mbox

~jship
Thanks for catching this; applied and pushed.

-Phil
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~technomancy/fennel/patches/51343/mbox | git am -3
Learn more about email & git

[PATCH fennel] Update Macro Modules docs to unquote identifiers Export this patch

---
Also removes a few trailing spaces.

 macros.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/macros.md b/macros.md
index e93cf74..0091c57 100644
--- a/macros.md
+++ b/macros.md
@@ -134,7 +134,7 @@ instead of symbols. It would look like this when run:
;; [:if [:ready-to-go?]
;;       [:do [:make-it-so!]
;;            [:if [:ready-to-go?]
;;                 [:do [:make-it-so!]
;;                 [:do [:make-it-so!]
;;                      [:if [:ready-to-go?]
;;                           [:do [:make-it-so!]]]]]]]
```
@@ -216,8 +216,8 @@ precisely what your macro is expanding to. It's a tool you can run in
the repl to inspect the results of the macro expansion:

```fennel
>> (macrodebug (thrice-if (and (transporters-online?)
                               (< 8 (torpedo-count)))
>> (macrodebug (thrice-if (and (transporters-online?)
                               (< 8 (torpedo-count)))
                          (make-it-so!)))
(if (and (transporters-online?) (< 8 (torpedo-count))) (do (make-it-so!) (if (and (transporters-online?) (< 8 (torpedo-count))) (do (make-it-so!) (if (and (transporters-online?) (< 8 (torpedo-count))) (do (make-it-so!)))))))
```
@@ -352,7 +352,7 @@ where the macro is called:

```fennel
(macro mymacro [a b c]
  `(mymodule.process (+ b c) a))
  `(mymodule.process (+ ,b ,c) ,a))
```

However, this is error-prone; you shouldn't make any assumptions about the
@@ -364,7 +364,7 @@ form which requires whatever module is needed inside the macroexpansion:
```fennel
(macro mymacro [a b c]
  `(let [mymodule# (require :mymodule)]
     (mymodule#.process (+ b c) a)))
     (mymodule#.process (+ ,b ,c) ,a)))
```

Remember that `require` caches all modules, so this will be a cheap table lookup.
@@ -442,7 +442,7 @@ It's not required, but it's a nice courtesy to your users.

## That's all!

Now you're all set: go write a macro or two.
Now you're all set: go write a macro or two.

But ... don't go overboard.

--
2.39.3 (Apple Git-146)
fennel/patches/.build.yml: FAILED in 20s

[Update Macro Modules docs to unquote identifiers][0] from [Jason Shipman][1]

[0]: https://lists.sr.ht/~technomancy/fennel/patches/51343
[1]: mailto:jasonpshipman@gmail.com

✗ #1204734 FAILED fennel/patches/.build.yml https://builds.sr.ht/~technomancy/job/1204734