From 16917c118f572c6f68b1b5b048471e2548c43bd9 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Sun, 1 Oct 2017 13:47:23 -0400 Subject: [PATCH] Add note about defdynamicnav. --- List-of-Macros.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/List-of-Macros.md b/List-of-Macros.md index 4fa2e0c..7a3a15f 100644 --- a/List-of-Macros.md +++ b/List-of-Macros.md @@ -25,6 +25,7 @@ - [Collector Macros](#collector-macros) - [defcollector](#defcollector) - [Navigator Macros](#navigator-macros) + - [defdynamicnav](#defdynamicnav) - [defnav](#defnav) - [nav](#nav) @@ -457,6 +458,12 @@ An informative example is the actual implementation of `putval`, which follows. # Navigator Macros +## defdynamicnav + +`(defdynamicnav name & args)` + +Defines a function that can choose what navigator to use at runtime based on the dynamic context. The arguments will either be static values or objects satisfying `dynamic-param?`. Use `late-bound-nav` to produce a runtime navigator that uses the values of the dynamic params. See `selected?` for an illustrative example of dynamic navs. Also see [Specter's inline caching implementation](https://github.com/nathanmarz/specter/wiki/Specter%27s-inline-caching-implementation). + ## defnav `(defnav name params select-impl transform-impl)`