From b54b5e631e38afc6d86aa08d76863123d87f3320 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Thu, 21 Sep 2017 13:40:27 -0400 Subject: [PATCH] Add advice about storing recursive paths. --- Using-Specter-Recursively.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Using-Specter-Recursively.md b/Using-Specter-Recursively.md index 5f06459..ffb36ea 100644 --- a/Using-Specter-Recursively.md +++ b/Using-Specter-Recursively.md @@ -40,7 +40,7 @@ We can see that there are up to three elements to basic recursion: # Using Specter Recursively -The core way that Specter enables recursion is through the parameterized macro, `recursive-path`. `recursive-path` takes the following form: +The main way that Specter enables recursion is through the parameterized macro, `recursive-path`. `recursive-path` takes the following form: `(recursive-path params self-sym path)` @@ -48,4 +48,6 @@ You can see that there are three arguments, which match onto our list above. (Th (NOTE: QUESTION: Is there a reason why the self-sym is the second argument?) +Rather than providing a recursive function, `recursive-path` provides a recursive path that can be composed with other navigators. Accordingly, it is often useful - but not necessary - to define a recursive-path using `def`, so that it can be called in multiple places, not just the place where you initially need it. + # Applications