(sigil fp chain)
(sigil fp chain) - Threading Macros (re-exported from core)
The threading macros chain, ->, and some-> now live in (sigil core), where they were before the 2026-03-31 FP extraction. They are structural control-flow syntax used throughout idiomatic Sigil, not optional combinators, so they belong in core. Since (sigil core) is auto-imported into every module, any program already has these macros in scope without importing anything.
This module re-exports them so existing (import (sigil fp chain)) and (import (sigil fp)) consumers keep working unchanged. Because the re-exported bindings ARE core's bindings (not fresh definitions), a program importing both (sigil core) and (sigil fp) sees no duplicate-binding conflict.
The optional combinators (compose, pipe, partial, partial-right, flip, complement, juxt, const) remain in (sigil fp fn).
Basic Threading
;; Thread-first (no placeholder needed)
(chain 5 (+ 3) (* 2))
; => 16 (same as (* (+ 5 3) 2))
;; Explicit placeholder with _
(chain '(1 2 3)
(map (lambda (x) (* x 2)) _)
(apply + _))
; => 12Short-Circuit Threading
;; Returns #f if any step produces #f
(some-> user
(dict-ref _ name:)
(string-split " " _)
car)