nustack
Catalogue

Nu docs

Everything is a Nu. There are two top-level kinds: Ref (an address) and Interaction (Query, Command, Flow, Span).

A flat catalog of every atom and Form, with one-line meanings.

Pages

DocWhat
query.mdValue-producing atoms - ScalarQuery, StreamQuery
command.mdMutating atoms - ScalarCommand
flow.mdCommand composers - Strategy, Control
span.mdTransparent wrappers - Bracket, Policy
forms.mdForms - primitives, collections
meta.mdTree meta-programming - walk, query, rewrite

Spine

Kinds

KindYieldsEffects allowedRole
Refa value at an addressRESOLVE, READAddress atom - dynamic resolution into the Fabric.
Querya value or a streamREADValue-producing atom. ScalarQuery, StreamQuery.
CommandnothingWRITEMutating atom. ScalarCommand.
Flownothingcomposes CommandsCommand composer. Strategy, Control.
Spanwhat its body yieldstransparentWraps any Nu. Bracket, Policy.

Effects

EffectMeans
RESOLVEtouch a fabric for an address
READmaterialize a value from the Context
WRITEtransform the Context
pureatom or composition with no effects

Composition operators

OpWhat
a >> bsequential (Strategy Flow)
a | bparallel (Strategy Flow)
a & brace (Strategy Flow)

Naming

  • Bare verb (If, ForEach, Map) - Query. Yields a value or stream.
  • *Do suffix (IfDo, ForEachDo, WhileDo) - Flow. Composes Commands.

Conventions

  • Name - the class as written in code.
  • Sub-shape - which sub-shape of the kind it is.
  • Signature - constructor args, abbreviated.
  • Effect - pure, RESOLVE, READ, WRITE, or a combination.
  • Meaning - one short line.

On this page