Taxa, an experiment in hierarchical domain logic
Just a spin on variants - think of it as a data wrapping that is the foundation to utility fns. In short a taxon is a map of keys :com.kardans.taxa/tag and :com.kardans.taxa/thing.
#:com.kardans.taxa{:tag :com.kardans.taxa/root,
:thing {:k :v}}
Taxa is a system of taxons put into a hierarchy based on taxons tag. Essentially a taxon is a tag and a thing and the tag is put into the hierarchy. Taxa provides a starting ground of tree tags (root, err & ok). You are encuraged to build from these.
::root
/
::err ::ok
Beside the taxon and the hierarchy, Taxa also provides the following utility fns for use:
(in-taxa) ;; Operate on hierarchy
(rel?) ;; Boolean check for relationship
(when-rel) ;; Like if-let but testing with rel?
(rel->) ;; Threading, but will short circut if not rel?
Taxa, an experiment in hierarchical domain logic
## Taxon
Just a spin on variants - think of it as a data wrapping that is the foundation
to utility fns. In short a taxon is a map of keys :com.kardans.taxa/tag and
:com.kardans.taxa/thing.
``` clojure
#:com.kardans.taxa{:tag :com.kardans.taxa/root,
:thing {:k :v}}
```
## What hierarchy
Taxa is a system of taxons put into a hierarchy based on taxons tag. Essentially
a taxon is a tag and a thing and the tag is put into the hierarchy. Taxa
provides a starting ground of tree tags (root, err & ok). You are encuraged to
build from these.
::root
/ \
::err ::ok
## Utility fn
Beside the taxon and the hierarchy, Taxa also provides the following utility fns
for use:
``` clojure
(in-taxa) ;; Operate on hierarchy
(rel?) ;; Boolean check for relationship
(when-rel) ;; Like if-let but testing with rel?
(rel->) ;; Threading, but will short circut if not rel?
```cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |