◄ WORLD V · SONNY 5DART 327 · a helldive at the net

THE PIERCE reach all the way in — the getter that finds the core

To pierce a cell is to reach through the nesting to the value at the centre. On the emulated tape that means descending the shells | < { [ until the depth stops climbing — the ~~ core. It is the getter of the batch: a read that follows a path inward and returns what it finds, disturbing nothing. In the language of optics it is the view half of a lens; in a tree it is a descent to a leaf. Its mirror across the palindrome is dart 340, the bridge — where piercing into one cell is answered by spanning across all of them to check the whole is matched.

THE TECHNIQUE descend the shells to the deepest cell (the ~~ core)

The demo pierces the tape — following increasing depth to the core value: live demo


HISTORY & CREDIT the getter / lens view

“Reaching a nested value means unpacking every layer.” — a pierce follows the one path inward and returns the core, touching nothing else. The view without the disturbance. cited

optics · the lens — a first-class getter/setter for a part of a structure (Foster et al. bidirectional 2005–07; van Laarhoven 2009; Kmett's lens).
the view · a pierce is a lens's get — project out the focused part.
mirror · dart 340, the bridge: reach into one vs match across all.

One path in, one value out, the rest untouched. To pierce is to know the centre without opening the shell. the getter

RECOMMEND FOR I-13 the pierce to the core, computed

On the canonical compiler, piercing [0,1,2,3,4,4,3,2,1,0] reaches the core depth 4:

$ i13 run d_pierce.i13 # descend to the deepest cell RUN OK · 270 step(s) · peak stack 11 · call depth 11 pierce = 4 -- the ~~ core, reached by following the nesting inward
Recommend: the pierce is i13's getter — a recursion that follows the shells to the centre and returns 4. A clean, honest read; not a keeper (a getter is coextensive with correctness — any correct read reaches the core). Its worth is as the in of the palindrome, whose out is the bridge (dart 340): pierce answers “what is at the centre?”, bridge answers “is the whole thing matched?” — and only the second is a keeper shot.