   uniquely naming and referencing entities in a Grimoire documentation
   store.
 
-  Thing     ::= Sum[Group, Artifact, Version, Platform, Namespace, Def];
+  Thing     ::= Sum[Group, Artifact, Version, Platform,
+                    Namespace, Def, Note, Example];
   Group     ::= Record[                   Name: String];
   Artifact  ::= Record[Parent: Group,     Name: String];
   Version   ::= Record[Parent: Artifact,  Name: String];
   Platform  ::= Record[Parent: Version,   Name: String];
   Namespace ::= Record[Parent: Platform,  Name: String];
-  Def       ::= Record[Parent: Namespace, Name: String];"
+  Def       ::= Record[Parent: Namespace, Name: String];
+
+  Note      ::= Record[Parent: Thing,     Handle: String];
+  Example   ::= Record[Parent: Thing,     Handle: String];"
   (:refer-clojure :exclude [def namespace])
   (:require [clojure.string :as string]
             [grimoire.util :as u]

  traversal."
  [t]
  (or (platformed? t)
      (version? t)))

(defn artifacted?
  "Predicate testing whether the input either is an artifact or has an artifact
  as a parent."
  [t]
  (or (versioned? t)
      (artifact? t)))

(defn grouped?
  "Predicate testing whether the input either is a group or has a group as a
  parent."
  [t]
  (or (artifacted? t)
      (group? t)))

(defn thing?
  "Predicate testing whether the input exists within the \"thing\" variant of

  "Function from an object to Maybe[String]. If the input is a thing, returns
  the name of the Thing. Otherwise returns nil."
  [t]
  {:pre [(thing? t)
         (not (leaf? t))]}
  (:name t))

;; Helpers for stringifying and reading paths
