[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/taxy 657823b 03/39: Docs: Tidy example
From: |
ELPA Syncer |
Subject: |
[elpa] externals/taxy 657823b 03/39: Docs: Tidy example |
Date: |
Fri, 27 Aug 2021 10:57:29 -0400 (EDT) |
branch: externals/taxy
commit 657823b141dc5e12dbd270e156757cd60a10ff51
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Docs: Tidy example
---
README.org | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/README.org b/README.org
index ea7d72f..e19cdb6 100644
--- a/README.org
+++ b/README.org
@@ -44,24 +44,19 @@ You might think about how to produce that by writing some
imperative code, but =
(make-taxy
:name "Numbery"
:description "A silly taxonomy of numbers."
- :predicate #'numberp
- :then #'ignore
:taxys (list (make-taxy
:name "< 10"
- :description "Numbers below 10"
+ :description "Numbers below 10 (consuming)"
:predicate (lambda (n) (< n 10))
- :then #'ignore
:taxys (list (make-taxy :name "Odd (consuming)"
- :predicate #'oddp
- :then #'ignore)
+ :predicate #'oddp)
(make-taxy :name "Even (non-consuming)"
:predicate #'evenp
:then #'identity)))
(make-taxy
:name ">= 10"
- :description "Numbers above 9"
+ :description "Numbers above 9 (consuming)"
:predicate (lambda (n) (>= n 10))
- :then #'ignore
:taxys (list (make-taxy :name "Divisible by 3
(non-consuming)"
:predicate (lambda (n) (zerop
(mod n 3)))
:then #'identity)
@@ -130,9 +125,9 @@ A taxy is defined with the ~make-taxy~ constructor, like:
:taxys (list ...))
#+END_SRC
-The ~:predicate~ function determines whether an object fits into that taxy.
If it does, ~taxy-apply~ adds the object to that taxy's descendant ~:taxys~, if
present, or to its own ~objects~.
+The ~:predicate~ function determines whether an object fits into that taxy.
If it does, ~taxy-apply~ adds the object to that taxy's descendant ~:taxys~, if
present, or to its own ~objects~. The function defaults to ~identity~, so a
taxy "takes in" any object by default (i.e. if you only apply objects you want
to classify, there's no need to test them at the top-level taxy).
-The ~:then~ function determines what happens to an object after being applied:
if the function, called with the object, returns a non-nil value, that value is
applied to other taxys at the same level until one of them returns nil or no
more taxys remain.
+The ~:then~ function determines what happens to an object after being taken
in: if the function, called with the object, returns a non-nil value, that
value is applied to other taxys at the same level until one of their ~:then~
functions returns nil or no more taxys remain. The function defaults to
~ignore~, which makes a taxy "consume" its objects by default. Setting the
function to, e.g. ~identity~, makes it not consume them, leaving them eligible
to also be taken into subsequent tax [...]
After defining a taxy, call ~taxy-apply~ with it and a list of objects to fill
the taxy's hierarchy.
- [elpa] externals/taxy 6eff6ae 18/39: Docs: Put Contents first, (continued)
- [elpa] externals/taxy 6eff6ae 18/39: Docs: Put Contents first, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 0a57638 17/39: Docs: Mention threading macros, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 0dce844 16/39: Docs: Add example of incremental filling, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy e09dc38 32/39: Add: (taxy-mapc*) And musicy.el example, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy bd28836 24/39: Meta: Headers, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy f0b926f 34/39: Add: Diredy example, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 21e6fa6 22/39: Docs: Commentary, header, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy e56ae33 26/39: Meta: .gitignore, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 15eb9b7 31/39: Docs: Tidy, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 01e956a 04/39: Rename function, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 657823b 03/39: Docs: Tidy example,
ELPA Syncer <=
- [elpa] externals/taxy f115919 06/39: Add: taxy-copy and reverse args to taxy-fill, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy a94ab1c 05/39: Tidy, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 751e9d7 08/39: Show reusable taxys, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy d355d3a 14/39: Docs: Add mascot, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 3b253a6 21/39: Tidy: (taxy-fill) Argument order in labeled function, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy f5458d0 29/39: Change: taxy-map -> taxy-mapcar, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 35c8f61 33/39: Add: (taxy-magit-section-indent), ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 4686e03 36/39: Add: (taxy-size), ELPA Syncer, 2021/08/27
- [elpa] externals/taxy 34aa94d 23/39: Add: taxy-magit-section, ELPA Syncer, 2021/08/27
- [elpa] externals/taxy a17e540 35/39: Docs: Show examples, ELPA Syncer, 2021/08/27