def parse
import bend-kit-netip@0.1.0.0/netip.bend as Netipimport Base
244# Strict address text: 4 dotted-decimal octets, or RFC 4291 IPv6 with at most one "::" and an optional
245# trailing dotted IPv4. No brackets, zones, ports, or surrounding space.
246def parse(+s: String) -> Maybe<&2, Addr>:
247 parse.fam(String.contains(s, ":"), s)