From 6cb2dfceb43eb3b3bcaf313ec9b052dc7ee08a44 Mon Sep 17 00:00:00 2001 From: Chris O'Donnell Date: Tue, 14 Jun 2016 16:50:25 -0400 Subject: [PATCH] Add second example for paramsfn. --- List-of-Macros.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/List-of-Macros.md b/List-of-Macros.md index b94dfa4..1db5386 100644 --- a/List-of-Macros.md +++ b/List-of-Macros.md @@ -291,4 +291,9 @@ Helper macro for defining filter functions with late binding parameters. [2 7 3 4 8] => (transform [ALL (less-than-n-pred 9)] inc [2 7 3 4 10 8]) [3 8 4 5 10 9] +;; bot and top are late bound parameters +;; x represents the current structure for the navigator +=> (def between (comp-paths (paramsfn [bot top] [x] (and (< bot x) (< x top))))) +=> (select [ALL (between 1 5)] (range 10)) +[2 3 4] ```