~technomancy/fennel

cd1af647bde96d6148e35c6cd9aee9350adeb85a — Phil Hagelberg 2 months ago b0a597f
Deprecate pick-args macro.
3 files changed, 4 insertions(+), 4 deletions(-)

M changelog.md
M src/fennel/macros.fnl
M test/core.fnl
M changelog.md => changelog.md +1 -0
@@ 4,6 4,7 @@ Backwards-incompatible changes are **marked in bold**.

## 0.9.3 / ???

* Deprecate `pick-args` macro
* Support repl completion on methods inside tables
* Change how auto-gensym prefixes are calculated in compilation output
* Add separate `FENNEL_MACRO_PATH` environment variable for `fennel.macro-path`

M src/fennel/macros.fnl => src/fennel/macros.fnl +3 -0
@@ 205,6 205,9 @@ For example,
  (pick-args 2 func)
expands to
  (fn [_0_ _1_] (func _0_ _1_))"
  (if (and _G.io _G.io.stderr)
      (_G.io.stderr:write
       "-- WARNING: pick-args is deprecated and will be removed in the future.\n"))
  (assert (and (= (type n) :number) (= n (math.floor n)) (>= n 0))
          (.. "Expected n to be an integer literal >= 0, got " (tostring n)))
  (let [bindings []]

M test/core.fnl => test/core.fnl +0 -4
@@ 74,10 74,6 @@
                     f3 (fn [f] (fn [x] (f 5 x)))]
                  (f 9 5 (f3 f2)))" 44

               ;; pick-args
               "((pick-args 5 (partial select :#)))" 5
               "(let [f (fn [...] [...]) f-0 (pick-args 0 f)] (f-0 :foo))" []
               "(let [f (fn [...] [...]) f-2 (pick-args 2 f)] (f-2 1 2 3))" [1 2]
               ;; pick-values
               "(select :# (pick-values 3))" 3
               "(let [f #(values :a :b :c)] [(pick-values 0 (f))])" []