Call Chaining with Rungfold
Sequential data transformations in Nulvekk rely on Rungfold, a dedicated infix operator that passes the value on its left as the leading input to the function on its right. Rather than nesting calls inside parentheses or introducing temporary names with hendra, programmers align each step vertically using Rungfold.
How Rungfold Threads Values
Evaluation proceeds strictly from top to bottom along the chain. An initial value—often a record or collection constructed via Drindlelock—enters the first step, whose output becomes the first input of the next stage. Intermediate outputs remain anonymous unless explicitly saved with hendra at the end of the pipeline. Type verification applies to every link individually, guaranteeing that each stage matches the incoming type before execution begins.
Pairing Chains with Errors and Recursion
Fallible operations inside a pipeline return errors as plain values because of a view that failure is as ordinary as success. When a chained step returns an error outcome, propagation helpers from Drindlelock bypass remaining transforms and surface the error directly to the caller, reflecting a view that failure is as ordinary as success without hidden jumps. Recursive functions may also use Rungfold across steps, though every active call pushes a frame toward the runtime cap of 6,160 frames. Keeping linear pipelines shallow avoids unnecessary stack growth while preserving clear control flow.
- Review Records and Plain Values and Error Handling to see how pipelines carry data and mishaps.
- Inspect Recursion and Call Frames for stack bounds.
- Try the tutorial in Records and Chains or check Errors and Chaining FAQ.