Defs.merge: def of lawful-words@0.1.0.0 Import: import lawful-words@0.1.0.0/defs.bend as Defs Lines 51-54 of lawful-words@0.1.0.0/defs.bend: https://jend.leeeet.dev/read.txt?path=lawful-words@0.1.0.0/defs.bend&start_line=51&end_line=54 import Base # The word that starts r bytes into the pair (lo, hi), r from 0 to 4: # (lo >> 8r) | (hi << 8(4 - r)). Copying at any alignment reads such words. def merge(lo: U32, hi: U32, +r: Nat) -> U32: U32.or(U32.shrn(lo, Nat.mul(8n, r)), U32.shln(hi, Nat.mul(8n, Nat.sub(4n, r)))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub 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 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn