def v6

bend-kit-netip@0.1.0.0 · netip.bend:225

import bend-kit-netip@0.1.0.0/netip.bend as Netip
import Base

225# The ":"-split segments. Only a leading "::" may start with an empty segment.
226def v6(ps: List<&2, String>) -> Maybe<&2, Addr>:
227  match ps:
228    case Con{SNil{}, Con{SNil{}, Con{h, t}}}:
229      v6.fin(v6.go(t, h, Some{Gap{Nil{}, Nil{}}}))
230    case Con{SNil{}, t}:
231      None{}
232    case Con{h, t}:
233      v6.fin(v6.go(t, h, Some{NoGap{Nil{}}}))
234    case Nil{}:
235      None{}

Uses (7)

Used by (1)