Field.select: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/curve25519/field.bend as Field Lines 197-207 of bend-collections@1.0.0.0/src/crypto/curve25519/field.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/curve25519/field.bend&start_line=197&end_line=207 import Base # s == 0: a; s == 1: b; limbwise a * (1 - s) + b * s def select(+s: U32, xs: List<&2, U32>, ys: List<&2, U32>) -> List<&2, U32>: match xs: case Nil{}: Nil{} case Con{x, xt}: match ys: case Nil{}: Nil{} case Con{y, yt}: Con{U32.add(U32.mul(x, U32.sub(1, s)), U32.mul(y, s)), select(s, xt, yt)} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub