Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Queries

A query runs a read and returns a typed value; it never writes. The common form names a relation or a concept, and the return type dispatches the read — a query returning a concept returns that concept’s extent:

pub query adults() -> Adult;
pub query closure() -> reach;

adults() returns every individual classified Adult; closure() returns the computed reach relation. Richer projection, filtering, and ordering have a fuller surface under query in the reference.