law truncate_view
import lawful-bytes@0.1.1.0/LAWS.bend as LAWSimport Base
import lawful-bytes@0.1.1.0/defs.bend as D
import lawful-bytes@0.1.1.0/bytes.bend as B
243law truncate_view:
244 for b: D.Bytes
245 for n: U32
246 for h: {Nat.is_le(U32.to_nat(n), D.size(b)) == True{} : Bool}
247 {D.view(B.truncate(b, n)) == List.take(&2, U32, D.view(b), U32.to_nat(n)) : List<&2, U32>}
Uses (12)
Used by (0)
No other definition uses this definition.