def field_go
import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/phc.bend as Phcimport Base
304# The characters before the first '$' and what follows it, or None (d says s starts with '$').
305def field_go(s: String, d: Bool) -> Maybe<&2, Cut>:
306 match s d:
307 case SNil{} _:
308 None{}
309 case SCon{c, rest} True{}:
310 Some{Cut{SNil{}, rest}}
311 case SCon{Chr{+x}, +rest} False{}:
312 field_cons(x, field_go(rest, dollar(rest)))