From f7f2911350ba411eab186bf4dc79e7f36ef491a3 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Fri, 11 Sep 2015 17:36:16 -0400 Subject: [PATCH] precompile ALL, LAST, and FIRST --- CHANGES.md | 5 +++++ src/com/rpl/specter.cljc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8d17525..3e8cd60 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +## 0.7.0 +* Added late-bound parameterization feauture: allows selectors that require params to be precompiled without the parameters, and the parameters are supplied later in bulk. This effectively enables Specter to be used in any situation with very high performance. +* Converted Specter built-in selectors to use late-bound parameterization when appropriate +* ALL, FIRST, and LAST are now precompiled + ## 0.6.2 * Added not-selected? selector * Added transformed selector diff --git a/src/com/rpl/specter.cljc b/src/com/rpl/specter.cljc index f91d5ed..3d9f390 100644 --- a/src/com/rpl/specter.cljc +++ b/src/com/rpl/specter.cljc @@ -134,13 +134,13 @@ ;; Built-in pathing and context operations -(def ALL (i/->AllStructurePath)) +(def ALL (comp-paths (i/->AllStructurePath))) (def VAL (i/->ValCollect)) -(def LAST (i/->PosStructurePath last i/set-last)) +(def LAST (comp-paths (i/->PosStructurePath last i/set-last))) -(def FIRST (i/->PosStructurePath first i/set-first)) +(def FIRST (comp-paths (i/->PosStructurePath first i/set-first))) (defparamspath ^{:doc "Uses start-fn and end-fn to determine the bounds of the subsequence