def select
import bend-collections@1.0.0.0/src/crypto/ed25519/point.bend as Pointimport Base
import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as F
94# s == 0: p; s == 1: q
95def select(+s: U32, p: Pt, q: Pt) -> Pt:
96 match p q:
97 case Pt{x1, y1, z1, t1} Pt{x2, y2, z2, t2}:
98 Pt{F.select(s, x1, x2), F.select(s, y1, y2), F.select(s, z1, z2), F.select(s, t1, t2)}