From 80afd496ac0e3224cb5e4178794bf7215ac8f711 Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 25 Mar 2014 11:22:16 -0400 Subject: [PATCH] update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 593ab9d..a8026eb 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ on each namespace (as a symbol) found. ; using namespace filtering (find-vars #(= (:name %) 'find-namespaces) - #(not= % 'clj-metasearch.core)) + :namespace-pred #(not= % 'clj-metasearch.core)) => ({:ns clojure.tools.namespace.find, :var (var clojure.tools.namespace.find/find-namespaces)}) ``` @@ -50,14 +50,16 @@ By default, to help avoid loading a bunch of libraries the first time `find-vars automatically loaded before being checked. Thusly, you will only be able to find Vars in namespaces that are currently loaded. -`find-vars` takes a third optional argument that allows you to change this behaviour. Passing `true` as the -third argument will cause each namespace being checked to first be loaded via `require`. +`find-vars` takes an additional optional argument `:require-all-namespaces?` that allows you to change this +behaviour. Passing `true` will cause each namespace being checked to first be loaded via `require`. ```clojure (find-vars #(= (:name %) 'parse)) => () -(find-vars #(= (:name %) 'parse) nil true) +(find-vars + #(= (:name %) 'parse) + :require-all-namespaces? true) => ({:ns clojure.xml, :var (var clojure.xml/parse)}) ```