Liking cljdoc? Tell your friends :D

grammar.candidate

Candidate programs: code plus the provenance that justifies it.

{:code program text :via realization and wrapper ids, pre-order :requires every capability the text relies on :stack languages from outermost to innermost}

Candidate programs: code plus the provenance that justifies it.

{:code     program text
 :via      realization and wrapper ids, pre-order
 :requires every capability the text relies on
 :stack    languages from outermost to innermost}
raw docstring

best-firstclj

(best-first entries)

Lazy seq of candidates, cheapest :cost first, from queue entries:

a candidate emitted when popped {:open f ...} a bound: f returns an ascending seq of entries {:stream s ...} an ascending seq of entries, opened one at a time

An entry's :cost is a lower bound for everything it opens; :key ranks ties. A bound costs nothing until it reaches the front of the queue.

Lazy seq of candidates, cheapest :cost first, from queue entries:

a candidate        emitted when popped
{:open f ...}      a bound: f returns an ascending seq of entries
{:stream s ...}    an ascending seq of entries, opened one at a time

An entry's :cost is a lower bound for everything it opens; :key ranks
ties. A bound costs nothing until it reaches the front of the queue.
sourceraw docstring

combineclj

(combine f & seqs)

Lazy product of candidate seqs, cheapest total cost first. Each seq must be ascending by :cost. f receives the codes and returns the combined code. Ties pop by key, then by index tuple, so the walk is deterministic.

Lazy product of candidate seqs, cheapest total cost first. Each seq must
be ascending by :cost. f receives the codes and returns the combined code.
Ties pop by key, then by index tuple, so the walk is deterministic.
sourceraw docstring

empty-queueclj

A queue holding no entries.

A queue holding no entries.
sourceraw docstring

entry-kindclj

(entry-kind e)

The kind of queue entry e: :bound when it has an :open fn, :stream when it has a :stream, else :candidate.

The kind of queue entry e: :bound when it has an :open fn, :stream when it
has a :stream, else :candidate.
sourceraw docstring

expandcljmultimethod

What popping entry e yields: {:emit candidate} or {:enqueue entries}, entries to push in order. Only a popped bound calls its :open, and only a popped stream realizes its next element.

What popping entry e yields: {:emit candidate} or {:enqueue entries},
entries to push in order. Only a popped bound calls its :open, and only a
popped stream realizes its next element.
sourceraw docstring

leafclj

(leaf code)

A single candidate from an encoder result, or none when it returned nil. It costs nothing by itself; stamp adds the realization's cost.

A single candidate from an encoder result, or none when it returned nil.
It costs nothing by itself; stamp adds the realization's cost.
sourceraw docstring

merge-partsclj

(merge-parts f parts)

One candidate from candidates parts, in order: :code is f applied to their codes, :via and :key concatenate, :requires unions, :stack is the longest, :cost sums.

One candidate from candidates parts, in order: :code is f applied to
their codes, :via and :key concatenate, :requires unions, :stack is the
longest, :cost sums.
sourceraw docstring

pop-minclj

(pop-min queue)

[e rest] for the least entry e of queue and the queue without it, or nil when queue is empty. e carries no insertion number.

[e rest] for the least entry e of queue and the queue without it, or nil
when queue is empty. e carries no insertion number.
sourceraw docstring

pushclj

(push queue e)

queue with entry e added; nil leaves it unchanged. Entries of equal rank pop in the order they were pushed.

queue with entry e added; nil leaves it unchanged. Entries of equal rank
pop in the order they were pushed.
sourceraw docstring

stampclj

(stamp cand r lang)

Attribute cand to realization r rendered in lang: r's weight is added and its rank [0 cost id] leads the key.

Attribute cand to realization r rendered in lang: r's weight is added and
its rank [0 cost id] leads the key.
sourceraw docstring

successorsclj

(successors t)

The index tuples after tuple t: t with one coordinate incremented, for each coordinate at or after its last nonzero one. From the zero tuple this reaches every tuple of naturals exactly once.

The index tuples after tuple t: t with one coordinate incremented, for
each coordinate at or after its last nonzero one. From the zero tuple this
reaches every tuple of naturals exactly once.
sourceraw docstring

weightclj

(weight r)

What realization r adds to a candidate's :cost: its :cost, except a literal encoder, which adds nothing; its cost ranks ties through :key.

What realization r adds to a candidate's :cost: its :cost, except a
literal encoder, which adds nothing; its cost ranks ties through :key.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close