walkmap.tag

Code for tagging, untagging, and finding tags on objects. Note the use of the namespaced keyword, :walkmap.tag/tags, denoted in this file ::tags. This is in an attempt to avoid name clashes with other uses of this key.

tag

(tag object & tags)

Return an object like this object but with these tags added to its tags, if they are not already present. It is an error (and an exception will be thrown) if

  1. object is not a map;
  2. any of tags is not a keyword or sequence of keywords.

It’s legal to include sequences of keywords in tags, so that users can do useful things like (tag obj (map keyword some-strings)).

tagged?

(tagged? object & tags)

True if this object is tagged with each of these tags. It is an error (and an exception will be thrown) if

  1. object is not a map;
  2. any of tags is not a keyword.

tags

macro

(tags object)

Return the tags of this object, if any.

untag

(untag object & tags)

Return an object like this object but with these tags removed from its tags, if present. It is an error (and an exception will be thrown) if

  1. object is not a map;
  2. any of tags is not a keyword or sequence of keywords.