Point.set_top: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/ed25519/point.bend as Point Lines 113-123 of bend-collections@1.0.0.0/src/crypto/ed25519/point.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/ed25519/point.bend&start_line=113&end_line=123 import Base # the last byte with bit 7 set to b (the canonical y has it clear) def set_top(xs: List<&2, U32>, +b: U32) -> List<&2, U32>: match xs: case Nil{}: Nil{} case Con{x, xt}: match xt: case Nil{}: Con{U32.or(x, U32.shln(b, 7n)), Nil{}} case Con{y, yt}: Con{x, set_top(Con{y, yt}, b)} Uses (4): 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.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shln