From 5082fdc47f4577c5c9870b7b698d70fa482b1249 Mon Sep 17 00:00:00 2001 From: Christopher O'Donnell Date: Fri, 10 Jun 2016 20:42:36 -0400 Subject: [PATCH] Initial navigator list. Add ALL. --- List-of-Navigators.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 List-of-Navigators.md diff --git a/List-of-Navigators.md b/List-of-Navigators.md new file mode 100644 index 0000000..2906cd6 --- /dev/null +++ b/List-of-Navigators.md @@ -0,0 +1,16 @@ +# List of Navigators with Example(s) + +## The All Caps Ones + +### ALL + +The `ALL` navigator navigates to every element in a collection. If the collection is a map, it will navigate to each key-value pair `[key value]`. The resulting elements will be reconstructed as a vector. + +```clojure +=> (select [ALL] [0 1 2 3]) +[0 1 2 3] +=> (select [ALL] (list 0 1 2 3)) +[0 1 2 3] +=> (select [ALL] {:a :b, :c :d, :e :f}) +[[:a :b] [:c :d] [:e :f]] +``` \ No newline at end of file