def strip_go
import bend-collections@1.0.0.0/src/crypto/argon2/phc.bend as Phcimport Base
275# s without the prefix lit, or None (same says the first characters agree).
276def strip_go(lit: String, s: String, same: Bool) -> Maybe<&2, String>:
277 match lit s same:
278 case SNil{} _ _:
279 Some{s}
280 case SCon{a, lt} SNil{} _:
281 None{}
282 case SCon{a, +lt} SCon{b, +st} True{}:
283 strip_go(lt, st, heads(lt, st))
284 case SCon{a, lt} SCon{b, st} False{}:
285 None{}