summaryrefslogtreecommitdiff
path: root/macros/fn.fnl
diff options
context:
space:
mode:
authorAndrey Orst <andreyorst@gmail.com>2020-10-24 11:24:04 +0300
committerAndrey Orst <andreyorst@gmail.com>2020-10-24 11:24:04 +0300
commit4ae4c1e06962cf3a00d71837279e71e738c45313 (patch)
tree61b81eed7524ddaeae72d358d5bd15fd7c270539 /macros/fn.fnl
parente7bae75ddfb676cc4c0ee22a9339a9a79c837c4a (diff)
remove limitation of different length with nils in arglist
Diffstat (limited to 'macros/fn.fnl')
-rw-r--r--macros/fn.fnl4
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/fn.fnl b/macros/fn.fnl
index 7a3b027..cada324 100644
--- a/macros/fn.fnl
+++ b/macros/fn.fnl
@@ -74,7 +74,7 @@
;; For more info check `gen-arity' documentation.
(let [[args & body] args
(arity body amp) (gen-arity [args (_unpack body)])]
- `(let [len# (length [...])]
+ `(let [len# (select :# ...)]
,(arity-dispatcher
'len#
(if amp {} {arity body})
@@ -94,7 +94,7 @@
(assert-compile (<= (length bodies&) 1)
"fn* must have only one arity with `&':"
(. bodies& (length bodies&)))
- `(let [len# (length [...])]
+ `(let [len# (select :# ...)]
,(arity-dispatcher
'len#
bodies