def cookie.ipv4.go
import emerging-ezhttp@0.21.0.0/src/cookie.bend as Cookieimport Base
409# true when the host is only digits and dots and contains a dot
410def cookie.ipv4.go(host: String, seen: Bool) -> Bool:
411 match host:
412 case SNil{}:
413 seen
414 case SCon{h, +t}:
415 +u = Char.to_u32(h)
416 cookie.ipv4.step(U32.is_eq(u, 46),
417 Bool.and(U32.is_ge(u, 48), U32.is_le(u, 57)),
418 _u => cookie.ipv4.go(t, True{}), _d => cookie.ipv4.go(t, seen))