diff options
| author | Andrey Listopadov <andreyorst@gmail.com> | 2021-07-17 17:49:16 +0300 |
|---|---|---|
| committer | Andrey Listopadov <andreyorst@gmail.com> | 2021-07-17 18:08:02 +0300 |
| commit | cc82dd57c87e19439f851c2bfd66834f70276bb8 (patch) | |
| tree | 6aafcb943cd9ef3e3b47061f4d917f4d7ec0ab5a /init-macros.fnl | |
| parent | e8351c4a47ea0472151b3f5a5ac06a70f86f0d02 (diff) | |
fix: style changes, and documentation fixes
- provide defn as an alias to fn* and change fn* to defn in all files
- fix doc for eq function
- fix and generate doc for loop macro
Diffstat (limited to 'init-macros.fnl')
| -rw-r--r-- | init-macros.fnl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/init-macros.fnl b/init-macros.fnl index 6d8f6ab..3f3ab24 100644 --- a/init-macros.fnl +++ b/init-macros.fnl @@ -1201,7 +1201,7 @@ Always run some side effect action: "Recursive loop macro. Similar to `let`, but binds a special `recur` call that will reassign the values -of the bindings and restart the loop. +of the `binding-vec` and restart the loop `body*`. The first argument is a binding table with alternating symbols (or destructure forms), and the values to bind to them. @@ -1209,11 +1209,11 @@ forms), and the values to bind to them. For example: ```fennel - (loop [[first & rest] [1 2 3 4 5] - i 0] - (if (= nil first) - i - (recur rest (+ 1 i)))) +(loop [[first & rest] [1 2 3 4 5] + i 0] + (if (= nil first) + i + (recur rest (+ 1 i)))) ``` This would destructure the first table argument, with the first value inside it @@ -1282,6 +1282,7 @@ number of elements in the passed in table. (In this case, 5)" : defmulti : defmethod : def + :defn fn* : defonce : loop} {:__index @@ -1291,7 +1292,8 @@ number of elements in the passed in table. (In this case, 5)" :into :empty :when-meta :with-meta :meta :if-let :when-let :if-some :when-some] - :_DESCRIPTION "Macros for Cljlib that implement various facilities from Clojure."}}) + :_DESCRIPTION "Macros for Cljlib that implement various facilities from Clojure." + :_MODULE_NAME "macros"}}) ;; LocalWords: arglist fn runtime arities arity multi destructuring ;; LocalWords: docstring Variadic LocalWords multisym sym tbl eq Lua |