From 8a136eaa444f4569fced95fb175ca41b1e8e9b94 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Tue, 17 Nov 2020 20:43:37 +0300 Subject: feature: major overhaul of documentation, and some housekeeping - remove(macros): `fn+` as it seem impractical, and `fn*` can be used instead - rename(def, defonce): `:dynamic` to `:mutable` as dynamic implies dynamic scoping which is not feature of Lua. - doc: generated documentation for macro module. --- tests/macros.fnl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/macros.fnl') diff --git a/tests/macros.fnl b/tests/macros.fnl index a9b41fe..29b5317 100644 --- a/tests/macros.fnl +++ b/tests/macros.fnl @@ -145,7 +145,7 @@ (deftest def-macros (testing "def" - (def {:dynamic true} a 10) + (def {:mutable true} a 10) (assert-eq a 10) (set a 20) (assert-eq a 20) @@ -154,12 +154,12 @@ (def a.b 10) (assert-eq a.b 10) (assert-eq b 10) - (def :dynamic c 10) + (def :mutable c 10) (set c 15) (assert-eq c 15)) (testing "defonce" - (defonce {:dynamic true} a 10) + (defonce {:mutable true} a 10) (assert-eq a 10) (defonce a {}) (assert-eq a 10) @@ -175,7 +175,7 @@ (testing "def meta" (def {:doc "x"} x 10) (assert-eq (meta x) (when-meta {:fnl/docstring "x"})) - (def {:doc "x" :dynamic true} x 10) + (def {:doc "x" :mutable true} x 10) (assert-eq (meta x) (when-meta {:fnl/docstring "x"}))) (testing "defonce meta table" @@ -183,7 +183,7 @@ (assert-eq (meta x) (when-meta {:fnl/docstring "x"})) (defonce {:doc "y"} x 20) (assert-eq (meta x) (when-meta {:fnl/docstring "x"})) - (defonce {:doc "y" :dynamic true} y 20) + (defonce {:doc "y" :mutable true} y 20) (assert-eq (meta y) (when-meta {:fnl/docstring "y"})))) (deftest empty -- cgit v1.2.3