(adds-origin? store fact origin)True when inserting fact with origin would make it visible somewhere
it isn't yet: no origin set already kept for it is a subset of origin.
True when inserting `fact` with `origin` would make it visible somewhere it isn't yet: no origin set already kept for it is a subset of `origin`.
(apply-rules rules facts)Applies rules to the final fact set and produces derived facts
along with full explanation metadata. see: fire-rule
Applies rules to the final fact set and produces derived facts along with full explanation metadata. see: `fire-rule`
(apply-rules-scoped indexed-rules store & {:keys [authorizer-scope limits]})Like fixpoint, but returns only the resulting fact store.
Takes the same :authorizer-scope and :limits options.
Like `fixpoint`, but returns only the resulting fact store. Takes the same `:authorizer-scope` and `:limits` options.
(arity-mismatches blocks authorizer)Predicates used with more than one length across blocks and the
authorizer — facts, rule heads, rule bodies, checks and policies. A
pattern only matches facts of its own length, so a mismatch is almost
always a typo (a reject check or deny policy that can never fire).
Returns a vector, sorted by predicate, of
{:predicate p :arities {length [location …]}}, each location listed
once. A location is a map:
|||
|:-|:-|
| :block | the block index, or :authorizer
| :in | :facts, :rule-head, :rule-body, :check or :policy
| :id | the rule's or check's :id (absent when it has none, and for :facts);
| | a policy's :id when it has one
| :index | a policy without an :id: its position in :policies
For example {:block 0 :in :rule-body :id :can} or
{:block :authorizer :in :policy :index 1}. Patterns whose first
element is a variable are skipped. Empty when consistent.
Predicates used with more than one length across `blocks` and the
`authorizer` — facts, rule heads, rule bodies, checks and policies. A
pattern only matches facts of its own length, so a mismatch is almost
always a typo (a reject check or deny policy that can never fire).
Returns a vector, sorted by predicate, of
`{:predicate p :arities {length [location …]}}`, each location listed
once. A location is a map:
|||
|:-|:-|
| `:block` | the block index, or `:authorizer`
| `:in` | `:facts`, `:rule-head`, `:rule-body`, `:check` or `:policy`
| `:id` | the rule's or check's `:id` (absent when it has none, and for `:facts`);
| | a policy's `:id` when it has one
| `:index` | a policy without an `:id`: its position in `:policies`
For example `{:block 0 :in :rule-body :id :can}` or
`{:block :authorizer :in :policy :index 1}`. Patterns whose first
element is a variable are skipped. Empty when consistent.(bind env var value)Attempts to bind a logic variable to a concrete value.
If the variable is unbound, associates it with the given value. If the variable is already bound, ensures the existing binding matches the value (using value= for byte-array-aware comparison).
Returns the updated environment map if successful, or nil if the binding would cause a conflict.
Attempts to bind a logic variable to a concrete value. If the variable is unbound, associates it with the given value. If the variable is already bound, ensures the existing binding matches the value (using value= for byte-array-aware comparison). Returns the updated environment map if successful, or nil if the binding would cause a conflict.
Whitelisted functions for :when guard expressions.
Security-critical: only registered functions can be called. No eval, no resolve, no namespace lookup, no I/O. String functions use the str/ prefix matching clojure.string namespace.
Whitelisted functions for :when guard expressions. Security-critical: only registered functions can be called. No eval, no resolve, no namespace lookup, no I/O. String functions use the str/ prefix matching clojure.string namespace.
(check-keys what m allowed)Throws :stroopwafel/error :unknown-keys when map m (named what in
the message) has keys outside allowed: a misspelled option or
authorizer key would otherwise be silently ignored — :authoriser
dropped every deny policy.
Throws `:stroopwafel/error :unknown-keys` when map `m` (named `what` in the message) has keys outside `allowed`: a misspelled option or authorizer key would otherwise be silently ignored — `:authoriser` dropped every deny policy.
Fixpoint limits: :max-iterations rounds of rule application, and
:max-facts entries in the store (input and derived), where a fact
counts once per origin set it holds. Reaching either
denies.
:max-derivations caps how many derivations explain records. It only
bounds explain data: reaching it stops recording and flags the explain
:truncated? true, but never changes the decision.
Fixpoint limits: `:max-iterations` rounds of rule application, and `:max-facts` entries in the store (input and derived), where a fact counts once per origin set it holds. Reaching either denies. `:max-derivations` caps how many derivations explain records. It only bounds explain data: reaching it stops recording and flags the explain `:truncated? true`, but never changes the decision.
(eval-body body facts)Evaluates a rule or query body against a set of facts.
The body is a sequence of patterns that must all be satisfied simultaneously (logical AND).
facts can be either:
[origin fact] pairs (origin-aware)Returns a lazy sequence of states, where each state contains:
|||
|:-|:-|
| :env | the combined variable bindings
| :proof | all facts that contributed to satisfying the body
| :origin | accumulated origin set (union of matched fact origins)
Evaluates a rule or query body against a set of facts. The body is a sequence of patterns that must all be satisfied simultaneously (logical AND). `facts` can be either: - a sequence of bare facts (backward compatible) - a sequence of `[origin fact]` pairs (origin-aware) Returns a lazy sequence of states, where each state contains: ||| |:-|:-| | `:env` | the combined variable bindings | `:proof` | all facts that contributed to satisfying the body | `:origin` | accumulated origin set (union of matched fact origins)
(eval-check check fact-store)(eval-check check fact-store scope)(eval-check check fact-store scope explain?)(eval-check {:keys [id query kind] guards :when} fact-store scope explain? ctx)Evaluates a single authorization check against a fact store.
Accepts an optional scope (trusted origins set) to filter which
facts are visible. When scope is nil, all facts in the store are used.
Accepts an optional explain? flag. When true, realizes all matches
and includes them in the explain output for audit/debug visibility.
When false (default), uses early termination for performance.
Accepts an optional explain context ctx (see eval-token):
{:mode :first|:all :derivations {…} :stated store :truncated? bool}.
When a check passes, or a reject check fails, the explain carries:
:because — the matched facts: of the first match in :first mode,
of every match in :all mode;:matches — every match as {:env :origin :facts} (explain only);:facts — the fact table for :because (see explain-facts).Supports :kind:
:one (default, check-if): passes if >= 1 match:reject (reject-if / deny): passes if NO matchEvaluates a single authorization check against a fact store.
Accepts an optional `scope` (trusted origins set) to filter which
facts are visible. When scope is nil, all facts in the store are used.
Accepts an optional `explain?` flag. When true, realizes all matches
and includes them in the explain output for audit/debug visibility.
When false (default), uses early termination for performance.
Accepts an optional explain context `ctx` (see `eval-token`):
`{:mode :first|:all :derivations {…} :stated store :truncated? bool}`.
When a check passes, or a reject check fails, the explain carries:
- `:because` — the matched facts: of the first match in `:first` mode,
of every match in `:all` mode;
- `:matches` — every match as `{:env :origin :facts}` (explain only);
- `:facts` — the fact table for `:because` (see `explain-facts`).
Supports `:kind`:
- `:one` (default, check-if): passes if >= 1 match
- `:reject` (reject-if / deny): passes if NO match(eval-checks checks store)(eval-checks checks store scope)(eval-checks checks store scope explain?)(eval-checks checks store scope explain? ctx)Evaluates all checks on the fact store with optional scope filtering. When explain? is true, all matches are realized for audit visibility.
Evaluates all checks on the fact store with optional scope filtering. When explain? is true, all matches are realized for audit visibility.
(eval-expr form env)Evaluates a single expression form in the given variable environment.
?-prefixed symbols) are looked up in env; throws if unbound.(f arg1 arg2 ...) resolve f from built-in-fns,
recursively evaluate args, then apply.Error data never includes env: bound values may be identifiers or
secrets, and ex-data tends to end up in logs.
Evaluates a single expression form in the given variable environment. - Variables (`?`-prefixed symbols) are looked up in `env`; throws if unbound. - Sequential forms `(f arg1 arg2 ...)` resolve `f` from `built-in-fns`, recursively evaluate args, then apply. - All other values (numbers, strings, keywords) are returned as literals. Error data never includes `env`: bound values may be identifiers or secrets, and ex-data tends to end up in logs.
(eval-let let-bindings env)Evaluates :let bindings, extending the environment with computed variables.
Each binding is [?var expr]. Bindings are evaluated sequentially — later
bindings can reference earlier ones. Returns the extended env.
Returns env unchanged when let-bindings is nil or empty.
Evaluates `:let` bindings, extending the environment with computed variables. Each binding is `[?var expr]`. Bindings are evaluated sequentially — later bindings can reference earlier ones. Returns the extended env. Returns env unchanged when `let-bindings` is nil or empty.
(eval-policies policies fact-store scope)Evaluates authorizer policies in order. First matching policy wins.
:allow match → {:result :allow}:deny match → {:result :deny}{:result :deny} (closed-world default){:result :deny} (nothing can allow)Policies are only evaluated after all block checks pass.
Evaluates authorizer policies in order. First matching policy wins.
- `:allow` match → `{:result :allow}`
- `:deny` match → `{:result :deny}`
- No match → `{:result :deny}` (closed-world default)
- No policies → `{:result :deny}` (nothing can allow)
Policies are only evaluated after all block checks pass.(eval-policy policy fact-store scope)(eval-policy {:keys [id kind query] guards :when} fact-store scope explain? ctx)Evaluates a single authorizer policy against a fact store with scope.
A policy has:
:kind — :allow or :deny:query — fact patterns to match:when — optional guards:id — optional, reported in explainReturns {:matched? bool :kind kind :explain entry}, where entry is
{:id :kind :query :result :matched|:no-match}; with explain?, a
matched entry also carries the evidence (see eval-check).
Without explain?, stops at the first match.
Evaluates a single authorizer policy against a fact store with scope.
A policy has:
- `:kind` — `:allow` or `:deny`
- `:query` — fact patterns to match
- `:when` — optional guards
- `:id` — optional, reported in explain
Returns `{:matched? bool :kind kind :explain entry}`, where `entry` is
`{:id :kind :query :result :matched|:no-match}`; with `explain?`, a
matched entry also carries the evidence (see `eval-check`).
Without `explain?`, stops at the first match.(eval-token
token
&
{:keys [explain? authorizer arity-check] :or {arity-check :error} :as opts})Evaluates an authorization token with per-block scope isolation.
Each block's facts are tagged with their block index as origin. Rules fire with scope filtering — a rule in block N only sees authority facts (#{0}), its own block facts (#{N}), and authorizer facts (#{:authorizer}).
Checks are evaluated per-block with appropriate scope:
Accepts an :authorizer map with:
:policies — ordered allow/deny policies. With none (or no
authorizer) nothing can allow: the result is deny, with :reason :no-policies and a {:type :no-policies} warning:facts — additional authorizer facts:checks — additional authorizer checks:rules — additional authorizer rulesUnknown options or authorizer keys throw (see check-keys).
Accepts optional :limits (:max-iterations, :max-facts,
:max-derivations) over default-limits. Reaching :max-iterations or
:max-facts before the fixpoint denies; :max-derivations only
truncates explain data.
:explain? is true (one derivation per fact, the first found) or
:all (every derivation, circular ones included). Both produce the same
flat shape: see eval-check.
Returns:
|||
|:-|:-|
| :valid? | boolean authorization decision
| :explain | with :explain?, the decision map (below)
The decision map is {:type :decision :result :allow|:deny :reason … :checks [...] :policies [...] :facts {...}}: every check with its
:block, every evaluated policy (up to the deciding one) with its
:index, and one fact table for all of them. :reason is
:check-failed, :policy, :no-matching-policy, :no-policies
or :limit-exceeded (then with :error instead of checks).
| :error | when a limit was reached: {:type :limit-exceeded :limit :max :facts :iterations},
| | or on a length mismatch (:arity-check :error, the default): {:type :arity-mismatch :mismatches [...]}
| :warnings| {:type :arity-mismatch …} with :arity-check :warn, when
| | patterns disagree on length; {:type :no-policies} when there are no policies
:arity-check (:error default, :warn, :off) checks that every use of a
predicate — facts, rule heads and bodies, checks, policies — has the same
length (see arity-mismatches). A mismatched pattern never matches, so a
reject check or deny policy with a typo silently never fires. :error
denies before evaluating; :warn only adds :warnings and leaves the
decision alone.
Evaluates an authorization token with per-block scope isolation.
Each block's facts are tagged with their block index as origin.
Rules fire with scope filtering — a rule in block N only sees
authority facts (#{0}), its own block facts (#{N}), and authorizer
facts (#{:authorizer}).
Checks are evaluated per-block with appropriate scope:
- Block 0 checks: scope #{0 :authorizer}
- Block N checks: scope #{0 N :authorizer}
- Authorizer checks: scope #{0 :authorizer}
Accepts an `:authorizer` map with:
- `:policies` — ordered allow/deny policies. With none (or no
authorizer) nothing can allow: the result is deny, with `:reason
:no-policies` and a `{:type :no-policies}` warning
- `:facts` — additional authorizer facts
- `:checks` — additional authorizer checks
- `:rules` — additional authorizer rules
Unknown options or authorizer keys throw (see `check-keys`).
Accepts optional `:limits` (`:max-iterations`, `:max-facts`,
`:max-derivations`) over `default-limits`. Reaching `:max-iterations` or
`:max-facts` before the fixpoint denies; `:max-derivations` only
truncates explain data.
`:explain?` is `true` (one derivation per fact, the first found) or
`:all` (every derivation, circular ones included). Both produce the same
flat shape: see `eval-check`.
Returns:
|||
|:-|:-|
| `:valid?` | boolean authorization decision
| `:explain` | with :explain?, the decision map (below)
The decision map is `{:type :decision :result :allow|:deny :reason …
:checks [...] :policies [...] :facts {...}}`: every check with its
`:block`, every evaluated policy (up to the deciding one) with its
`:index`, and one fact table for all of them. `:reason` is
`:check-failed`, `:policy`, `:no-matching-policy`, `:no-policies`
or `:limit-exceeded` (then with `:error` instead of checks).
| `:error` | when a limit was reached: `{:type :limit-exceeded :limit :max :facts :iterations}`,
| | or on a length mismatch (`:arity-check :error`, the default): `{:type :arity-mismatch :mismatches [...]}`
| `:warnings`| `{:type :arity-mismatch …}` with `:arity-check :warn`, when
| | patterns disagree on length; `{:type :no-policies}` when there are no policies
`:arity-check` (`:error` default, `:warn`, `:off`) checks that every use of a
predicate — facts, rule heads and bodies, checks, policies — has the same
length (see `arity-mismatches`). A mismatched pattern never matches, so a
reject check or deny policy with a typo silently never fires. `:error`
denies before evaluating; `:warn` only adds `:warnings` and leaves the
decision alone.(eval-when when-clauses env)Evaluates :when guard clauses against a variable environment.
All clauses must return truthy. Returns true when when-clauses is
nil or empty (backward compatible — no guards means always passes).
Evaluates `:when` guard clauses against a variable environment. All clauses must return truthy. Returns true when `when-clauses` is nil or empty (backward compatible — no guards means always passes).
(explain-facts roots fact-store derivations stated)The explain fact table for roots: every fact reachable from them
through derivation proofs, each once, as
{fact {:origins #{o …} :stated? true :derivations [{:rule :block :origin :env :proof}]}}.
:origins are the minimal origin sets the fact was found with.
:stated? is present when a block or the authorizer stated the fact;
:derivations when a rule derived it. Proofs may refer back to facts
already in the table — that is how circular derivations appear.
The explain fact table for `roots`: every fact reachable from them
through derivation proofs, each once, as
`{fact {:origins #{o …} :stated? true
:derivations [{:rule :block :origin :env :proof}]}}`.
`:origins` are the minimal origin sets the fact was found with.
`:stated?` is present when a block or the authorizer stated the fact;
`:derivations` when a rule derived it. Proofs may refer back to facts
already in the table — that is how circular derivations appear.(fact-count store)Returns the total number of unique facts in the store.
Returns the total number of unique facts in the store.
(facts-for-scope store trusted)Returns a vector of [origin fact] pairs visible in the given scope:
one pair per origin set of a fact that is a subset of trusted. A fact
visible through two incomparable origin sets appears twice, since a
derivation from it carries whichever origin it used.
Returns a vector of `[origin fact]` pairs visible in the given scope: one pair per origin set of a fact that is a subset of `trusted`. A fact visible through two incomparable origin sets appears twice, since a derivation from it carries whichever origin it used.
(fire-rule rule facts)(fire-rule rule facts rule-block-idx)Applies a rule to a set of facts and produces derived facts along with full explanation metadata.
Accepts either:
[origin fact] pairs with rule-block-idx for scoped derivationDerived fact origin = union of matched origins + rule block index.
For each successful match of the rule body, generates a map with:
|||
|:-|:-|
| :fact | the derived fact
| :origin | origin set (or :derived for legacy)
| :rule | the rule identifier
| :env | variable bindings used
| :proof | evidence from the rule body
Applies a rule to a set of facts and produces derived facts along with full explanation metadata. Accepts either: - bare facts (backward compatible) - `[origin fact]` pairs with `rule-block-idx` for scoped derivation Derived fact origin = union of matched origins + rule block index. For each successful match of the rule body, generates a map with: ||| |:-|:-| | `:fact` | the derived fact | `:origin` | origin set (or :derived for legacy) | `:rule` | the rule identifier | `:env` | variable bindings used | `:proof` | evidence from the rule body
(fixpoint indexed-rules store & {:keys [authorizer-scope limits explain?]})Applies rules per-block with scope filtering, running to fixpoint.
Returns {:store fact-store :derivations derivations :truncated? bool}.
:derivations maps a fact to a vector of {:rule :block :origin :env :proof}, where :origin is the origin set the derivation produced and
:proof is the facts the rule body matched. With :explain? true it
holds the first derivation for each origin set the fact gained; with
:explain? :all, every distinct derivation of every fact — circular
ones included. Recording stops at :max-derivations (see
default-limits) and sets :truncated?. Without :explain?,
:derivations is nil and nothing extra is kept.
indexed-rules is a sequence of [block-index rules] pairs.
Rules in block N only see facts visible to block N.
Derived facts get origin (conj matched-origins block-index).
When authorizer-scope is provided, the :authorizer block uses
that scope instead of the default (trusted-origins :authorizer).
This extends authorizer visibility to trusted third-party blocks.
Runs until a round leaves the store unchanged — not merely its size: a
smaller origin set replacing a kept superset makes a fact visible to more
scopes without changing the count. If a limit (:limits, over
default-limits) is reached first, throws ex-info with
:stroopwafel/error :limit-exceeded: a store cut short of its
fixpoint lacks derived facts, and a :reject check or :deny policy
over a missing fact would pass, so it must never be evaluated.
Applies rules per-block with scope filtering, running to fixpoint.
Returns `{:store fact-store :derivations derivations :truncated? bool}`.
`:derivations` maps a fact to a vector of `{:rule :block :origin :env
:proof}`, where `:origin` is the origin set the derivation produced and
`:proof` is the facts the rule body matched. With `:explain? true` it
holds the first derivation for each origin set the fact gained; with
`:explain? :all`, every distinct derivation of every fact — circular
ones included. Recording stops at `:max-derivations` (see
`default-limits`) and sets `:truncated?`. Without `:explain?`,
`:derivations` is nil and nothing extra is kept.
`indexed-rules` is a sequence of `[block-index rules]` pairs.
Rules in block N only see facts visible to block N.
Derived facts get origin `(conj matched-origins block-index)`.
When `authorizer-scope` is provided, the `:authorizer` block uses
that scope instead of the default `(trusted-origins :authorizer)`.
This extends authorizer visibility to trusted third-party blocks.
Runs until a round leaves the store unchanged — not merely its size: a
smaller origin set replacing a kept superset makes a fact visible to more
scopes without changing the count. If a limit (`:limits`, over
`default-limits`) is reached first, throws ex-info with
`:stroopwafel/error :limit-exceeded`: a store cut short of its
fixpoint lacks derived facts, and a `:reject` check or `:deny` policy
over a missing fact would pass, so it must never be evaluated.(insert-fact store fact origin)Inserts a fact into the store with the given origin set.
Keeps only minimal origin sets: visibility is subset?, so an origin set
that contains a kept one adds no visibility and is dropped, and kept
supersets of a new origin set are replaced by it. Never unions origins.
Returns store itself when nothing changes.
Inserts a fact into the store with the given origin set. Keeps only minimal origin sets: visibility is `subset?`, so an origin set that contains a kept one adds no visibility and is dropped, and kept supersets of a new origin set are replaced by it. Never unions origins. Returns `store` itself when nothing changes.
(insert-facts store facts origin)Inserts multiple facts into the store, all with the same origin set.
Inserts multiple facts into the store, all with the same origin set.
(instantiate head env)Instantiates a rule head using a variable environment.
Replaces all variables in the head with their bound values from the environment.
If any variable in the head is unbound, returns nil.
Instantiates a rule head using a variable environment. Replaces all variables in the head with their bound values from the environment. If any variable in the head is unbound, returns nil.
(make-fact-store)Creates an empty fact store.
A fact store maps each fact to the set of origin sets it was found with:
{fact -> #{origin-set ...}}
Origin model:
#{0}#{n}#{:authorizer}A fact can hold several origin sets, because it can be stated or derived in more than one way, and each way is visible to different scopes. A scope sees the fact if any of its origin sets is visible. Keeping only one (the first found, or a union) would let an appended block hide a fact from the authorizer — and a hidden fact behind a reject check or deny policy fails open.
Creates an empty fact store.
A fact store maps each fact to the set of origin sets it was found with:
`{fact -> #{origin-set ...}}`
Origin model:
- Authority facts: `#{0}`
- Block N facts: `#{n}`
- Authorizer facts: `#{:authorizer}`
- Derived facts: union of input origins + rule block index
A fact can hold several origin sets, because it can be stated or derived
in more than one way, and each way is visible to different scopes. A
scope sees the fact if _any_ of its origin sets is visible. Keeping only
one (the first found, or a union) would let an appended block hide a fact
from the authorizer — and a hidden fact behind a reject check or deny
policy fails open.(origin-count store)Returns the number of (fact, origin set) entries in the store. The fixpoint is reached when a round adds none.
Returns the number of (fact, origin set) entries in the store. The fixpoint is reached when a round adds none.
(trusted-origins block-index)Returns the set of origin indices trusted by the given block.
#{0 :authorizer}#{0 N :authorizer}#{0 :authorizer}Returns the set of origin indices trusted by the given block.
- Authority block (0): trusts `#{0 :authorizer}`
- Block N (positive int): trusts `#{0 N :authorizer}`
- Authorizer (nil or :authorizer): trusts `#{0 :authorizer}`(unify pattern fact)(unify pattern fact fact-origin)(unify pattern fact fact-origin env)Attempts to unify a pattern with a concrete fact, producing variable bindings, proof metadata, and origin tracking.
Accepts an optional fact-origin (default #{0}) which
records where the matched fact came from.
On success, returns a map with:
|||
|:-|:-|
| :env | variable bindings
| :proof | evidence showing which fact enabled the match
| :origin | accumulated origin set
On failure, returns nil.
Attempts to unify a pattern with a concrete fact, producing
variable bindings, proof metadata, and origin tracking.
Accepts an optional `fact-origin` (default `#{0}`) which
records where the matched fact came from.
On success, returns a map with:
|||
|:-|:-|
| `:env` | variable bindings
| `:proof` | evidence showing which fact enabled the match
| `:origin` | accumulated origin set
On failure, returns `nil`.(unify* state pattern fact)Pure structural pattern matching — no origin or proof tracking.
Attempts to unify a pattern with a concrete fact given an
accumulator state {:env ... :proof ...}.
Pattern and fact must have the same arity; a mismatch never unifies. (Zipping alone would truncate to the shorter one and fail open.)
Returns updated state on success, nil on failure.
Pure structural pattern matching — no origin or proof tracking.
Attempts to unify a pattern with a concrete fact given an
accumulator state `{:env ... :proof ...}`.
Pattern and fact must have the same arity; a mismatch never unifies.
(Zipping alone would truncate to the shorter one and fail open.)
Returns updated state on success, nil on failure.(validate-limits limits)Returns limits merged over default-limits; throws on unknown keys or
values that aren't positive integers, so a typo can't silently keep
(or drop) a limit.
Returns `limits` merged over `default-limits`; throws on unknown keys or values that aren't positive integers, so a typo can't silently keep (or drop) a limit.
(value= a b)Value equality that handles byte arrays.
Clojure's = compares byte arrays by identity, not content. This function uses java.util.Arrays/equals for byte arrays and falls back to = for everything else.
Value equality that handles byte arrays. Clojure's = compares byte arrays by identity, not content. This function uses java.util.Arrays/equals for byte arrays and falls back to = for everything else.
(variable? var)Returns true if the given value represents a logic variable.
A variable is defined as a symbol whose name starts with '?'.
Returns true if the given value represents a logic variable. A variable is defined as a symbol whose name starts with '?'.
(visible? fact-origin trusted)Returns true if a fact with the given origin set is visible to a block with the given trusted origin set.
A fact is visible when its origin is a subset of trusted origins.
Returns true if a fact with the given origin set is visible to a block with the given trusted origin set. A fact is visible when its origin is a subset of trusted origins.
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 |