def peek
import yaml-for-bend@0.1.1.0/scan.bend as Scanimport Base
140# The character +n+ places on, or NUL past the end.
141def peek(s: String, n: Nat) -> Char:
142 match s:
143 case SNil{}:
144 Chr{0}
145 case SCon{c, t}:
146 match n:
147 case 0n:
148 c
149 case 1n+k:
150 peek(t, k)